I'm very new to storyboards and objective-c in general. Basically, I have a welcome screen with 4 buttons on it. Each button loads a new scene via the modal way. I added the 3 new screens by dragging a View Controller onto the page. I only have one View Controller file also. I added this code in to make it support Landscape only mode:
// For iOS 5
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
// For IOS 6
-(BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscapeLeft;
}
Now, for some reason only the original view controller (The one that first came with the storyboard, and not the View Controllers I dragged on) responds to this code. I'm extremely new to this and have no idea how to fix this.
I think I need to create new .h and .m view controller files for each view controller, and add that code in there. My only question is, how do I link those files to the view controllers in the Storyboard?