In the new xcode 5 how do in interface builder you use to have a drop down menu there to connect your storyboard viewcontrollers to your classes how is this done now?
Asked
Active
Viewed 5.0k times
2 Answers
79
Unless I'm misunderstanding what you're asking, it's still there. Here are the steps to assign a custom view controller class to your view controller:
- Choose your view controller in the list of scenes on the left side.
- Choose the Identify Inspector on the right side.
- Choose the custom view controller class from the Class list.

Greg
- 33,450
- 15
- 93
- 100
3
1、manual creating a Cocoa Class to the project
2、open the story board, draw a view controller from tool box to the storyborad
3、click the controller you draw into the storyboard, and specify the 'Customer Class' to the class you create in step 1
4、if you use XIB, nibName could be the controller name, else if you use StoryBoard, you need set a storyboard id for your controller in your storyboard panel, and you can use the id and the storyboard in your superController when you want to new a controller
// XIB
var viewController = UIViewController(nibName: "ViewController", bundle: nil)
// StoryBoard
var viewController = storyboard.instantiateViewController(withIdentifier: "The-Storyboard-ID-You-Set") as! ViewController

gilon chiu
- 51
- 3