O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

View Controller Lifecycle Methods

View controllers have a number of methods that are automatically invoked over the controller’s life span. Sometimes, you want to do some setup when the view controller is first initialized. Or you might want to customize the view programmatically before it’s displayed to the user. You can override these lifecycle methods in your view controller subclasses.
Here’s a brief description of each view controller lifecycle method:
awakeFromNib: If you built the view for your view controller in Interface Builder, then awakeFromNib is called just before the view is unpacked and initialized from the nib file.
loadView: After awakeFromNib, loadView is called. loadView is where you can programmatically add views to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required