diff options
| -rw-r--r-- | Framework/MASShortcutView.h | 2 | ||||
| -rw-r--r-- | Framework/MASShortcutView.m | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Framework/MASShortcutView.h b/Framework/MASShortcutView.h index 166be44..656f4e4 100644 --- a/Framework/MASShortcutView.h +++ b/Framework/MASShortcutView.h @@ -21,4 +21,6 @@ typedef enum { /// Returns custom class for drawing control. + (Class)shortcutCellClass; +- (void)setAcceptsFirstResponder:(BOOL)value; + @end diff --git a/Framework/MASShortcutView.m b/Framework/MASShortcutView.m index 4132ce2..d96989c 100644 --- a/Framework/MASShortcutView.m +++ b/Framework/MASShortcutView.m @@ -24,6 +24,7 @@ NSString *const MASShortcutBinding = @"shortcutValue"; NSInteger _shortcutToolTipTag; NSInteger _hintToolTipTag; NSTrackingArea *_hintArea; + BOOL _acceptsFirstResponder; } #pragma mark - @@ -59,6 +60,7 @@ NSString *const MASShortcutBinding = @"shortcutValue"; _shortcutValidator = [MASShortcutValidator sharedValidator]; _enabled = YES; _showsDeleteButton = YES; + _acceptsFirstResponder = NO; [self resetShortcutCellStyle]; } @@ -565,7 +567,12 @@ void *kUserDataHint = &kUserDataHint; - (BOOL)acceptsFirstResponder { - return YES; + return _acceptsFirstResponder; +} + +- (void)setAcceptsFirstResponder:(BOOL)value +{ + _acceptsFirstResponder = value; } - (BOOL)becomeFirstResponder |
