Apple provide the split view only for landscape but not for the portrait mode. Is there any way to achieve the splitview in portrait mode also?
[splitViewController setHidesMasterViewInPortrait:NO];
This will work. But this API is not documented(private).
Thanks,
Manjunath
Answer: A: iPad does not support split-view in Portrait screen orientation - and only side-by-side in Landscape.
You can easily switch it to a vertical split. Click the 3 dots on the line splitting the windows of the screens. Click on the icon to the left showing 2 windows side by side. This will change the windows to be vertically split side by side.
For iOS5+,
Go to your detailViewController
. Your detailViewController
should have UISplitViewControllerDelegate
. And simply just drop this code in:
- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation{
return NO;
}
This will do the trick. And it is public API.
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