Reputation: 11
I have trawled the internet and can see how to add a new scene to the storyboard by dropping a tab bar item into the new controller and then creating a segue from the main tab bar controller to my new view. I have then added labels and run the project in the simulator. But when I add a button in the storyboard scene, where is the associated view controller file? How do I create it or select it in order to enter my buttons functions?
Upvotes: 1
Views: 1528
Reputation: 452
Adding a view controller to the storyboard does not generate code. You will want to create a custom class for each view controller. In order to do that you will need to follow the images below.
After you have done that you will see the new class for the final view controller on the left with all your other classes. You then need to connect the class to your view controller.
Upvotes: 2