Skip to content

Instantly share code, notes, and snippets.

@threeve
Created May 4, 2011 19:10
Show Gist options
  • Save threeve/955813 to your computer and use it in GitHub Desktop.
Save threeve/955813 to your computer and use it in GitHub Desktop.
@protocol SignalDelegate
- (void)signalDidChange:(Signal*)signal; // change to suit your needs
@end
@interface Signal
@property id<SignalDelegate> delegate;
...
@end
@implementation Signal
...
- timerCallback:(NSTimer:)
{
[self.delegate signalDidChange:self];
}
@end
@implementation MainViewController
- viewDidLoad;
{
signal = ...;
[signal setDelegate:self]
}
- (void)signalDidChange:(Signal*)signal;
{
// update progress bar
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment