Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 24th, 2012  |  syntax: None  |  size: 0.49 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. XCode IBAction NSButton to show/hide separate image?
  2. - (IBAction)toggleFunction:(id)sender;
  3. {
  4.     if( isOn )
  5.     {
  6.         [self stopFunction: (NSButton *)sender];
  7.         isOn = NO;
  8.     }
  9.     else
  10.     {
  11.         [self startFunction: (NSButton *)sender];
  12.         isOff = YES;
  13.     }
  14. }
  15.        
  16. - (IBAction)toggleFunction:(id)sender;
  17. {
  18.     if( isOn == YES )
  19.     {
  20.         [self stopFunction: sender];
  21.         isOn = NO;
  22.     }
  23.     else
  24.     {
  25.         [self startFunction: sender];
  26.         isOn = YES;
  27.     }
  28. }