Summary of UIViewController Lifecycle Call Order
Summary of UIViewController Lifecycle Call Order
1 init
2 loadView
3 viewDidLoad
4 viewWillAppear:
5 viewWillLayoutSubviews:
6 viewDidLayoutSubviews:
7 viewDidAppear:
8 viewWillDisappear:
9 viewDidDisappear:
10 dealloc
### 1. **Initialization**
- **`initWithFrame:`**: Called when a view is initialized
programmatically with a specific frame.
- **`initWithCoder:`**: Called when a view is initialized from a
storyboard or nib file. This is used when the view is loaded from an
archive or interface builder.
### 2. **Loading**
- **`awakeFromNib`**: Called after the view has been loaded from a
nib or storyboard. This is where you can perform additional setup
that couldn't be done during initialization.
### 8. **Deallocation**
- **`dealloc`**: This is called when the view is being deallocated from
memory. It's important to release any retained resources or
observers here.