diff options
| author | Paulo F. Andrade | 2014-09-17 16:50:37 +0100 | 
|---|---|---|
| committer | Paulo F. Andrade | 2014-09-17 16:50:37 +0100 | 
| commit | e53eed24bc6cc2856e732b16832730f6c2aa2827 (patch) | |
| tree | a284a46c044c63864597f0f4f1db89a57da6eba0 | |
| parent | 724376092de61df8cb90b5b5d81ae0c30bcd1b24 (diff) | |
| download | MASShortcut-e53eed24bc6cc2856e732b16832730f6c2aa2827.tar.bz2 | |
Implemented -initWithCoder: in MASShortcutView
| -rw-r--r-- | MASShortcutView.m | 24 | 
1 files changed, 19 insertions, 5 deletions
| diff --git a/MASShortcutView.m b/MASShortcutView.m index f4eb8ff..b2d2531 100644 --- a/MASShortcutView.m +++ b/MASShortcutView.m @@ -42,15 +42,29 @@  {      self = [super initWithFrame:frameRect];      if (self) { -        _shortcutCell = [[[self.class shortcutCellClass] alloc] init]; -        _shortcutCell.buttonType = NSPushOnPushOffButton; -        _shortcutCell.font = [[NSFontManager sharedFontManager] convertFont:_shortcutCell.font toSize:BUTTON_FONT_SIZE]; -        _enabled = YES; -        [self resetShortcutCellStyle]; +        [self commonInit]; +    } +    return self; +} + +- (id)initWithCoder:(NSCoder *)coder +{ +    self = [super initWithCoder:coder]; +    if (self) { +        [self commonInit];      }      return self;  } +- (void)commonInit +{ +    _shortcutCell = [[[self.class shortcutCellClass] alloc] init]; +    _shortcutCell.buttonType = NSPushOnPushOffButton; +    _shortcutCell.font = [[NSFontManager sharedFontManager] convertFont:_shortcutCell.font toSize:BUTTON_FONT_SIZE]; +    _enabled = YES; +    [self resetShortcutCellStyle]; +} +  - (void)dealloc  {      [self activateEventMonitoring:NO]; | 
