UISplitViewController set in portrait mode - ipad

In ipad app I want to set UISplitViewController method set in portrait mode.(i.e Like Settings application in ipad)
I have created a SplitViewbased application .When i run the application in portrait mode it doesn't show the splitview when i change the orientation into landscape it shows the splitview.In portrait mode also there is a toolbar button name "Root List" When i click the button it shows popover view to split view.
I want to show splitview in portrait mode with two separte views each has navigation controller.
Can anyone help me ?
Thanks in advance......

I doubt that you will be able to do this with the UISplitViewController, you would need to build your own custom version of it which mimicked most of the normal behavior, but kept the table showing in portrait mode.

As of iOS 5 the UISplitViewController will work in portrait mode. Look at the documentation for the delegate method:
- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation

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

I think your looking for APSplitViewController

Related

iOS ViewController only support portrait but popup support all orientation

Is it possible to support all orientation for popup (UIAlertController) which pops from the view controller, which is only supporting portrait right now?
Now I have viewcontroller support only portrait but the popup for this viewcontroller not to be landscape.
Help me.
If you have added UIAlertController to the portrait only view controller then i don't think this alert controller only can support all orientations since its added as a child of that view controller so it has to abide the parent.
Whereas if UIAlertController common to Application level then there may be possibilities to support any orientation.
Correct me if my understanding is wrong.

UISplitViewController - hiding master view in iPad landscape

I'm using the iOS SDK 8.1.
In landscape mode, is it possible to make the master view animate left to hide and then animate right to display again? I don't want it to overlap the detail view like in portrait mode.
Would I have to create my own custom split view controller for that functionality?
No, it is not possible to hide/unhide master in landscape mode.
There are many opensource libraries for creating custom splitView controller available.
This is one good library : https://github.com/mutualmobile/MMDrawerController

Multiple orientation in a single viewcontroller, with UISplitview based application

I have an application which works only on Landscape mode, and the rootViewController of the application window is a UISplitViewController. Now, I want a new viewController to be presented as a modal view controller that support both orientations (landscape and portrait). I have set the supported orientations in plist as Landscape only. However I have set all orientations in the new view controller. But, the orientations in not changing to portrait, may be because of the orientations specified in the plist.
What I basically want, is to have all the views in the application in landscape mode and just a single view in both orientations. Any help is greatly appreciated.
shouldAutorotateToInterfaceOrientation will tell the app to orient or not so what we can do here is have a flag which will tell to auto rotate or not. initially flag is false. but when you present a model view controller set it to true. and as it disappears set it to false again. this may do the trick
you can also refer this

iOS 5 autorotation not working

I have tab bar application and I have a problem with the rotation. I am using a storyboard with the tab bar controller as a initial view controller and on ios 6 everything works and views rotate to landscape and portrait, but on ios 5 views are only in portrait mode and rotation does not working.
I tried to create custom tab bar controller subclass and I added shouldAutoRotateToInterfaceOrientation function to it, and also to all view controllers in the tab bar but it didn't help.
Has someone any idea what can be wrong?
Edit:
If you have Xcode 4.5.2 you can create new project from tab bar application template and check yourself whether you have the same problem.
Check that this is in EVERY view controller in your app
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return YES;
}
But don't worry about subclassing the tab bar controller, you shouldn't need to do that.
I found that post and that solution works for me:
http://iosgems.blogspot.de/2012/11/how-to-get-autorotation-working-for.html

Popping view from UINavigationController changes device orientation

I have an issue issue with the UINavigationController on the iPad. When the app is started in landscape orientation, popping the top view controller from the navigation controller causes the device orientation to turn into portrait and the view displayed slides down when the view that becomes visible and adjusts to portrait orientation. It makes no difference if I initiate the call or if it's done automatically by the back button.
When the app is started in portrait mode and device is turned into landscape later I don't see the same behavior and everything works fine.
Any pointers to where and what to look for to find the cause or workaround suggestions to prevent this from happening are welcome.
Thank you,
Oz
One of the view controllers in your UINavigationController's view hierarchy is not overriding the shouldAutorotateToInterfaceOrientation: method, which by default only returns YES for UIInterfaceOrientationPortrait – so, when that particular view controller comes to the front, it auto-rotates to an orientation it supports.
You can fix this by finding the offending view controller and adding the code below:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Overriden to allow any orientation.
return YES;
}

Resources