首页 > 代码库 > Methods throughout the lifespan of a view controller

Methods throughout the lifespan of a view controller

Method                                Description
loadView                              Creates or returns a view for the view controller.
viewDidLoad                       View has finished loading.
viewWillAppear:                    View is about to appear with or without animation.
viewDidAppear:                    View did appear with or without animation.
viewWillDisappear:                View is about to disappear with or without animation.
viewDidDisappear:                View did disappear with or without animation.
viewWillLayoutSubviews        View is about to lay out its subviews.
viewDidLayoutSubviews        View did lay out its subviews.
didReceiveMemoryWarning    View detected low memory conditions.

 

The flow for retrieving and setting up a view in a view controller