Created
December 12, 2012 14:23
-
-
Save sebastienwindal/4268084 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @implementation MyView2 | |
| - (id)initWithFrame:(CGRect)frame | |
| { | |
| self = [super initWithFrame:frame]; | |
| if (self) { | |
| // Initialization code | |
| } | |
| return self; | |
| } | |
| /* | |
| // Only override drawRect: if you perform custom drawing. | |
| // An empty implementation adversely affects performance during animation. | |
| - (void)drawRect:(CGRect)rect | |
| { | |
| // Drawing code | |
| } | |
| */ | |
| @end |
This file contains hidden or 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
| @implementation MyView | |
| - (id)initWithFrame:(CGRect)frame | |
| { | |
| self = [super initWithFrame:frame]; | |
| if (self) { | |
| [self commonInitialiation]; | |
| } | |
| return self; | |
| } | |
| -(id) initWithCoder:(NSCoder *)aDecoder | |
| { | |
| self = [super initWithCoder:aDecoder]; | |
| if (self) { | |
| [self commonInitialiation]; | |
| } | |
| return self; | |
| } | |
| -(void) commonInitialiation | |
| { | |
| // common initialization | |
| } | |
| /* | |
| // Only override drawRect: if you perform custom drawing. | |
| // An empty implementation adversely affects performance during animation. | |
| - (void)drawRect:(CGRect)rect | |
| { | |
| // Drawing code | |
| } | |
| */ | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment