Please note, this blog entry is from a previous course. You might want to check out the current one.
Lecture #5 covers the view-controller life cycle and multiple MVCs and finishes with another demo of the Matchismo card game.
viewDidLoad is a good place to hold setup code – but has not geometry set yet.
viewWillAppear is for geometry-related initialization, lazy execution and late updating.
“A view gets loaded only once, but can appear and disappear a lot.”
viewWillDisAppear is suitable to “remember” and “clean up”.
view{Will,Did}LayoutSubviews is suitable to react to geometry changes.
Autorotation is controlled by shouldAutorotate …
Continue reading “cs193p – Lecture #5 – View Controller Lifecycle and Multiple MVCs”