Skip to content

Instantly share code, notes, and snippets.

@mteece
Created August 22, 2016 18:37
Show Gist options
  • Save mteece/edeca050c4e299daa69056d1ae10ee71 to your computer and use it in GitHub Desktop.
Save mteece/edeca050c4e299daa69056d1ae10ee71 to your computer and use it in GitHub Desktop.
UIViewController sequences
the proper sequence is
-(void)initWithCoder
-(void)awakefromNib //(if story board is used)
or
-(void)loadView----() //if manually generating the view contoller
-(void)viewDidLoad-----(called only once in the life cycle of viewController)
-(void)viewWillAppear
-(void)viewDidAppear
// While moving to a new ViewController
-(void)viewWillDisappear
-(void)viewDidDisappear
// While returning to the first ViewController
-(void)viewWillAppear
-(void)viewDidAppear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment