Reputation:
In my Xcode project, I have several view controllers in my storyboard. How can I see the code for a specific view controller?
Because each view controller will need to have different functions from the others. So, where can I write that code?
Thanks!
Upvotes: 4
Views: 22913
Reputation: 1
We start with multiple scenes in our storyboard.
In the Identity Inspector, In the Class field, Type in the name of the new view controller file we created in step 1
Upvotes: -1
Reputation: 21
Select the storyboard in the navigator, right click and select 'Open As'. You should see 2 options 'Interface Builder - Storyboard' or 'Source Code' - select the Source Code option should fix your issue.
Upvotes: 2
Reputation: 31
The "Show the Assistant editor" venn diagram icon on the top right did it for me. Xcode Version 6.4
Upvotes: 3
Reputation: 31
It's on the upper bar to the right.
Upvotes: 3
Reputation: 27536
By default, storyboard will use UIViewController for the view controllers you use.
However you can change the class used for the view controller by:
Where "MyOwnViewController" is the name of the UIViewController subclass that you want to use for that view controller.
Upvotes: 6
Reputation: 112873
You subclass each UIViewController
to add unique functionality. The implementation of UIViewController
is private to Apple, the interface is described in it's documentation.
Upvotes: 0