![]() They have to be optional because their values won’t be initialized until after init() has been called, but they can be automatically unwrapped because once they’re created you know they will always have values. Note: These are implicitly-unwrapped optionals (as denoted by the !). Var centerViewController: CenterViewController! You’ll make use of these methods soon.Īdd a couple of properties to ContainerViewController for the CenterViewController and for a UINavigationController, above viewDidLoad(): var centerNavigationController: UINavigationController! It adds a few static methods which make it a bit more concise to load specific view controllers from the app’s storyboard. At the bottom of the file there’s a small extension for UIStoryboard. If you’re new to this concept, check out Chapter 22 in iOS 5 by Tutorials, “UIViewController Containment.” Note: This section uses a concept called View Controller Containment introduced in iOS 5. In this section, you’re going to place the CenterViewController inside the ContainerViewController, as a child view controller. Now you’re familiar with the structure of the project, it’s time to start at square one: the center panel. The views for the center, left, and right view controllers are all defined within Main.storyboard, so feel free to take a quick look to get an idea of how the app will look. This could be replaced with your own view controller.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |