- What the UIViewController lifecycle is
- Order of lifecycle methods
- Methods called once vs multiple times
- Purpose of
viewDidLoad
- Purpose of
viewWillAppear
- Purpose of
viewDidAppear
- Purpose of layout methods
- Purpose of
viewWillDisappear
- Purpose of
viewDidDisappear
- Where to set up UI
- Where to perform heavy work
- Where to start and stop observers
- Cleanup and memory responsibilities
- Relationship between lifecycle and navigation
- Role of
deinit in lifecycle
1. What the UIViewController Lifecycle Is
The UIViewController lifecycle represents the sequence of events that occur as a view controller’s view is loaded into memory, appears on screen, disappears, and is eventually deallocated.
UIKit calls these methods automatically based on view visibility and ownership, not developer control.