I've been struggling with a very strange problem. In my iPad storyboard I drag a UISplitViewController. To the detail view controller I put a UIImage and set its image to an image. And I do the same thing to the master view controller. I do this just to see both master and detail view controllers display in landscape mode. But when I launch the app in iPad simulator, only the detail view controller captures the whole screen area and master does not show up. I tried setting the orientation of the split view controller to Landscape so that make it start in landscape mode but that did not help. I know I'm missing something here. What is that? Thank you in advance.
Found the problem. It seems I have to set both master and detail view controllers to support certain orientations. It means just dragging a view controller to the the storyboard, making it the detail/master view controller and putting an image inside won't work. We have to create a subclass of UIViewController and set the classes in the storyboard to these newly created UIViewController custom subclasses. It's because we need to implement shouldAutoRotate... method in both view controllers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With