Reputation: 2026
In my storyboard I drag on a new View Controller. My Storyboard now has two view controllers: the main one that came when I created the file, and the one a dragged on.
When I go into the 'assistant editor' and select the main view controller, I get the ViewController.h class. But when I select the other controller I get UIViewController.h which is an Apple file.
How do I link/create these classes for each View Controller? Is there an automated way to do this, or am I not doing it right.
Upvotes: 12
Views: 16096
Reputation: 8590
You need to create your own subclass of UIViewController and set the newly created view controller as the custom class in the storyboard.
Upvotes: 27