View Controller Subclasses and Templates
In this exercise, you were asked to create a UIViewController subclass by using the NSObject template and an empty XIB file that you configured for the view controller. This is useful for learning how the XIB file works. However, in practice, you typically let Xcode do the grunt work and use the UIViewController subclass template.
Throughout the rest of this book, you will create a lot of view controllers. To save on time and potential errors, we will instruct you to use the UIViewController template when that view controller will have a XIB file. When you create a view controller subclass with a XIB template, the XIB’s File's Owner is already set to the class of that view controller. It also has an instance ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access