Please note, this blog entry is from a previous course. You might want to check out the current one.
The seventh lecture addresses the interaction of multiple model-view controllers – especially navigation controllers.
Segues
The links between two view controllers are called segues. They always create a new instance of the called MVC and need to initialize that MVC e.g. using prepareForSegue.
Segues can also be prevented from happening using shouldPerformSegueWithIdentifier.
Popover
Where tab-bar, split-view and navigation controllers are view controllers, popovers are not. Though preparing popover segues works similar, their destruction needs special care, making the calling view controller the delegate.
The lecture and its slides are available via iTunes named “7. Multiple MVCs”. The code for the psychologist demo is available on GitHub and at Stanford.
I was unable to follow along on this lecture because when it got to the point of the ctrl-drag from the Golden Bear button to the FaceView to setup a segue, it would not allow me to connect to the FaceView! Any ideas?
I finally figured out my problem. When following along half-asleep, I used UILabels, rather than UIButtons, and that wouldn’t work, of course. 🙂