views:

2221

answers:

4

Hi,

I would like obtain a SplitView on my ipad application with my left menu in a portrait orientation such as iPad settings. For now in portrait orientation I have a content view in full screen and I have a button at NavigationBar which includes a popover with my left menu.

Thank you for your responses.

+5  A: 

Unfortunately, it's an undocumented method (i.e. private API).

[splitViewController setHidesMasterViewInPortrait:NO];

I think you need to create a custom view controller containing a table view (as the master controller) and another generic subview (as the detail controller) to simulate this.

KennyTM
Undocumented or private API? That's an important question when dealing with Apple ;-)
Paul Lynch
@paull: Undocumented == Private.
KennyTM
Although, remember: sometimes Apple "undocuments" an option because they want to be the only ones to use that effect. In that case many times they DO turn away apps that just SIMULATE private APIs with changes. I have had that happen when "getting too close to the look and feel" of the darned "edit" function of the "MORE" tab bar controller. They limit the icons you can arrange to 16. I tried to implement something that looked like it...and they turned me down saying it might confuse users if mine functioned close-but-not-the-same as theirs (ie: mine did a bit more.. allowed more than 16).
Jann
+1  A: 

Hi,

some people asked me the same question on our blog and I found a solution for that. You will find it at the end of my blog post Your first split view controller | Seaside.

In general, all you have to do is to create a subclass of UISplitViewController and override the method willAnimateRotationToInterfaceOrientation: duration: and adjust your master and detail views when the interface orientation will change to portrait mode.

Cheers, Andreas

anka
hi anka,i hav seen ur example source code multiple detail view but u didnt implement didselect method in root view ...can u give me a sample for that one also..
lak in iphone
Hi, I added some example code for that at my project MasterDetail. Checkout the git repository at http://github.com/anka/bw_examples/tree/master//MasterDetail/ . Cheers, Andreas
anka
+3  A: 

The easiest way to get the effect you want may be to just not use a UISplitView. Instead, just create a normal view, put a table view on its left side, your detail view on the right side, and then set the autosizing stuff appropriately so that everything looks right in both portrait and landscape.

Kristopher Johnson
+3  A: 

You should definitely have a look at Matt Legend's MGSplitViewController.

MGSplitViewController is an open source replacement for UISplitViewController, with various useful enhancements.

Sam V