Skip to content

Instantly share code, notes, and snippets.

@rickcnagy
Created July 28, 2013 00:29
Show Gist options
  • Save rickcnagy/6096868 to your computer and use it in GitHub Desktop.
Save rickcnagy/6096868 to your computer and use it in GitHub Desktop.
Methods to initiate view controller somehow *before* viewDidLoad - not usually necessary. From lecture 5 (47:00) of Standard CS193P Winter/Spring 2013
- (void) setup
{
// init that can't wait for viewDidLoad
}
- (void) awakeFromNib
{
[self setup];
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
[self setup];
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment