Created
December 23, 2010 22:50
-
-
Save jweinberg/753653 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
#import "MyAwesomeView.h" | |
@interface MyAwesomeView () | |
- (void)updateDisplay; | |
@end | |
@implementation MyAwesomeView | |
@synthesize textLabel; | |
- (void)dealloc; | |
{ | |
[textLabel release], textLabel = nil; | |
[button release], button = nil; | |
[super dealloc]; | |
} | |
- (void)awakeFromNib; | |
{ | |
[self updateDisplay]; | |
} | |
- (IBAction)incrementCount:(id)sender; | |
{ | |
counter += 1; | |
[self updateDisplay]; | |
} | |
- (void)updateDisplay; | |
{ | |
[self.textLabel setText:[NSString stringWithFormat:@"%d", counter]]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment