cs193p – Lecture #8 View Controller Lifecycle, Autolayout

Please note, this blog entry is from a previous course. You might want to check out the current one.

View Controller Lifecycle

  • viewDidLoad is called after instantiation and outlet setting (geometry is not set yet!) – use for setup
  • viewWillAppear is called before the view appears on screen (geometry is available) – use for layout setup and updates which happened while the view was off screen
  • viewDidAppear
  • viewWillDisappear – use for cleaning up and saving states
  • viewDidDisappear

Continue reading “cs193p – Lecture #8 View Controller Lifecycle, Autolayout”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #7 Multiple MVCs

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.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #8: Controller Lifecycle & Image/Scroll/WebViews

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture eight is named “8. Controller Lifecycle & Image/Scroll/WebViews (October 20, 2011)” and can be found at iTunes. Its slides are available at Stanford.

It starts with a theoretical part about the View Controller Lifecycle, the Image, the Web and the Scroll View.
Continue reading “Lecture #8: Controller Lifecycle & Image/Scroll/WebViews”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #7: iPad Apps

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture seven is named “7. iPad Apps (October 18, 2011)” and can be found at iTunes. Its slides are available at Stanford.

It starts by discussing UIToolbar and its UIBarButtonItems which are stored in an NSArray *toolbarItems. A bottom toolbar – which is hidden by default – can be made visible via storyboard or setting its @property toolbarHidden to NO.
Continue reading “Lecture #7: iPad Apps”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #6: Multiple MVCs and Segues

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture six is named “6. Multiple MVCs and Segues (October 13, 2011)” and can be found at iTunes. Its slides are available at Stanford.

It starts with a continuation of the demo from the second half of the previous lecture, adding features to Happiness namely delegates. The code for this demo is available directly at Stanford, and github.
Continue reading “Lecture #6: Multiple MVCs and Segues”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail