Changes

Jump to: navigation, search

Using Xcode Storyboarding with iOS 5

No change in size, 18:08, 1 February 2016
m
Text replacement - "<google>ADSDAQBOX_FLOW</google>" to "<htmlet>adsdaqbox_flow</htmlet>"
== Associating a View Controller with a Scene ==
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
At this point in the example we have two scenes but only one view controller (the one created by Xcode when we selected Single View Application). Clearly in order to be able to add any functionality behind scene 2 it too will need a view controller. The first step, therefore, is to add the files for a view controller to the project. Ctrl-click on the storyboard target at the top of the project navigator panel and select New File… from the resulting menu. In the new file panel select Objective-C class and click Next to proceed. On the options screen verify that the Subclass of menu is set to UIViewController, that the Targeted for iPad option is selected and that With XIB for user interface is deselected (since the view already exists in the storyboard there is no need for a user interface NIB file) and name the class Scene2ViewController.
Select the MainStoryboard.storyboard file in the project navigator panel and second scene in the canvas area followed by the View Controller item in the center panel as shown in Figure 17-7:

Navigation menu