User Tools

Site Tools


ios-labs-s14:class-02

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ios-labs-s14:class-02 [2014/02/05 11:51]
mbarboi [Subclassing ViewControllers]
ios-labs-s14:class-02 [2014/02/05 11:52]
mbarboi [Subclassing ViewControllers]
Line 238: Line 238:
 Note the new source code files visible in the project navigator. Each time you create a view controller the source code files are added to the existing project. One  step separates us from actually using the view controllers,​ however. We must let InterfaceBuilder know that the view controllers placed in the storyboard are the subclasses we just created. Without an explicit assignment InterfaceBuilder cannot tell which new class should be associated with which view controller. Note the new source code files visible in the project navigator. Each time you create a view controller the source code files are added to the existing project. One  step separates us from actually using the view controllers,​ however. We must let InterfaceBuilder know that the view controllers placed in the storyboard are the subclasses we just created. Without an explicit assignment InterfaceBuilder cannot tell which new class should be associated with which view controller.
  
-Note: when clicking on the body of a ViewController,​ Xcode thinks you want to click on the ViewController'​s views; notice that whatever is highlighted blue is what is currently selected. To select an entire controller, click right at the very top of the rectangle in your storyboard: this is the status bar, and always refers to the controller below it. +Note: when clicking on the body of a ViewController,​ Xcode thinks you want to click on the ViewController'​s views; notice that whatever is highlighted blue is what is currently selected. To select an entire controller, click right at the very top of the rectangle in your storyboard: this is the status bar, and always refers to the controller below it. If you have the //Identity Inspector// tab open in the right pane and you're working with a stock controller, the "​Class"​ field should read "​UIViewController"​ when you have selected the right thing. If it says "​UIView"​ or anything else, try again.
  
 ===Change View Controller Classes=== ===Change View Controller Classes===
ios-labs-s14/class-02.txt ยท Last modified: 2014/02/05 11:52 by mbarboi