Created
April 4, 2012 23:36
-
-
Save justin/2306582 to your computer and use it in GitHub Desktop.
Common Initializer Methods
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
- (id)init | |
{ | |
if ((self = [super initWithNibName:nil bundle:nil])) | |
{ | |
[self setup]; | |
} | |
return self; | |
} | |
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | |
{ | |
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) | |
{ | |
[self setup]; | |
} | |
return self; | |
} | |
- (id)initWithCoder:(NSCoder *)decoder | |
{ | |
if ((self = [super initWithCoder:decoder])) | |
{ | |
[self setup]; | |
} | |
return self; | |
} | |
- (void)setup | |
{ | |
// Handle all the setup stuff in here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment