Skip to content

Instantly share code, notes, and snippets.

@jweinberg
Created December 23, 2010 22:50
Show Gist options
  • Save jweinberg/753653 to your computer and use it in GitHub Desktop.
Save jweinberg/753653 to your computer and use it in GitHub Desktop.
#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