Created
May 4, 2011 19:10
-
-
Save threeve/955813 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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