diff options
| author | Tomáš Znamenáček | 2014-08-07 12:55:59 +0200 |
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-07 15:42:22 +0100 |
| commit | 46aa323115c2ebe7128aba39c0296634d232bbf6 (patch) | |
| tree | 8ac85cbbe5b5470c02cd4049ded389f023cb46af /Demo | |
| parent | 5f5f6cb9d086853065b2546e72d71a38230c6b59 (diff) | |
| download | MASShortcut-46aa323115c2ebe7128aba39c0296634d232bbf6.tar.bz2 | |
Added a simplified binding API for MASShortcutView.
This returns the associatedUserDefaultsKey property used in previous code
versions, only the implementation uses less magic.
Diffstat (limited to 'Demo')
| -rw-r--r-- | Demo/AppDelegate.m | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Demo/AppDelegate.m b/Demo/AppDelegate.m index 0c62358..7aff3d1 100644 --- a/Demo/AppDelegate.m +++ b/Demo/AppDelegate.m @@ -20,10 +20,7 @@ NSString *const MASPreferenceKeyConstantShortcutEnabled = @"MASDemoConstantShort - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { // Shortcut view will follow and modify user preferences automatically - [_shortcutView bind:MASShortcutBinding - toObject:[NSUserDefaultsController sharedUserDefaultsController] - withKeyPath:[@"values." stringByAppendingString:MASPreferenceKeyShortcut] - options:@{NSValueTransformerNameBindingOption:NSKeyedUnarchiveFromDataTransformerName}]; + [_shortcutView setAssociatedUserDefaultsKey:MASPreferenceKeyShortcut]; // Activate the global keyboard shortcut if it was enabled last time [self resetShortcutRegistration]; |
