Order the steps
Put these callbacks in the order they run when a view controller is created and shown for the first time.
- init(coder:) or init(nibName:bundle:)
- viewIsAppearing
- viewWillAppear
- loadView
- viewDidAppear
- viewDidLoad
Hint 1 of 1
The view is loaded lazily, before any appearance callbacks.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A D F C B E
- init(coder:) or init(nibName:bundle:) The object is created first; no view exists yet.
- loadView The view is created lazily when first needed.
- viewDidLoad Runs once after the view is loaded: one-time setup.
- viewWillAppear Called each time the view is about to appear.
- viewIsAppearing Traits and geometry are now up to date; good for appearance-time updates.
- viewDidAppear The view is on screen; start animations or analytics here.