Skip to content

Instantly share code, notes, and snippets.

@justin
Created April 4, 2012 23:36
Show Gist options
  • Save justin/2306582 to your computer and use it in GitHub Desktop.
Save justin/2306582 to your computer and use it in GitHub Desktop.
Common Initializer Methods
- (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