Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split view in portrait mode!

Tags:

ipad

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

like image 999
Manjunath Avatar asked Jan 25 '11 07:01

Manjunath


People also ask

Can you split iPad screen vertically?

Answer: A: iPad does not support split-view in Portrait screen orientation - and only side-by-side in Landscape.

How do you split screen vertically on Samsung?

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.


1 Answers

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.

like image 92
Byte Avatar answered Sep 24 '22 06:09

Byte