SplitViewController in Landscape Orientation. How Do I Hide the TableViewController? - ios

On iPad I have a UISplitViewController-based app. Has anyone figured out how to hide/show the tableViewController that is locked down on the left hand side - when in landscape orientation - stubbornly hogging precious screen real estate?
If you take a look at the iPad Dropbox app it has a nifty show/hide arrow that is exactly what I am after.

Related

iOS 8 Screen slides wrong direction when back button tapped

My application was written for iOS7 and I am trying to get it updated to iOS 8. My application is configured to only work in Landscape Left and Landscape Right orientations.
For iOS 8 I changed the order by which the screens are navigated and changed one of the modal screens to a push transition. On the main screen I have two UIBarButtonItems on the UINavigationItem. Each of these have a push segue assigned to them that connects to different screens.
When the app is running and one of the UIBarButtonItems is tapped, the screen associated through the segue slides over the main screen as expected. The back button is displayed normally. The problem occurs when the back button is tapped. The screen does not slide off to the right as would be expected.
On an iPhone 4 running iOS 7 the screen always slides down (towards the ground) regardless of the devices landscape left or landscape right orientation.
On an iPhone 6 Plus running iOS 8 the called screen quickly rotates to Upside Down (top towards the home button) and then slides off to home button side. Again it doesn't matter which way the phone is oriented landscape left or landscape right orientation.
I have tried setting the preferredInterfaceOrientationForPresentation, shouldAutorotate to NO, and setting the supportedInterfaceOrientations to UIInterfaceOrientationLandscapeRight | UIInterfaceOrientationLandscapeRight. Nothing seems to make any difference at all.
My screen navigation is straight forward, I'm no using any custom transitions. It's all through standard push segues.
I need to get the screen "back" transitions working correctly again.
Any help is greatly appreciated!
I have finally discovered what was causing my screens to slide the wrong direction. It turns out that overriding the supportedInterfaceOrientations method in the UIViewController and returning UIInterfaceOrientationLandscapeRight | UIInterfaceOrientationLandscapeLeft confuses the transition in iOS 8 (and devices running iOS 7 also). This was needed for proper operation in iOS 7, but evidently causes problems in iOS 8. So once I removed the code, the screen transitions began working correctly again.

UIImagePickerController landscape wrong orientation

I have a problem with UIImagePickerController on my iPad. it is presented as a modalView (presentViewController:).
All orientations are allowed and should work.
If I push a ViewController in Portrait mode on this VC (this is the main view of the App), go back to the Springboard, rotate the iPad to Landscape mode, reopen my App, There is a big black space on the screen.
However, the camera controls are well shown.
Has anyone already seen this kind of bug?
Thank you.
This is better with a screenshot

iOS: Change Orientation only for few pop-up views

I have an app which runs only in Landscape mode. All working well. But I have few pop-up views like Apptentative feedback view and Twitter Sheet view, works great when in portrait mode. So how can I change orientation forcefully when loading these pop-ups and back to landscape when these pop-up closes.
You can't force an orientation change. You can only support changes in orientation. IE moving the device 90 degrees to the right.

Ipad view Alignment

In my iPad app, i am supporting only portrait mode except on one screen. I have tab bar at bottom, on click of any tab,it opens a small view of size 320.0 * 600.0, with table view. On selecting any row in small view, a full screen view opens up. Problem is that when i came on full screen view which supports all orientations, next time,my other view especially the small view comes up with frame size of 768 * 1024.
Any sugeestions or help is appreciated!
I'm guessing the problem is that you read the frame size while still being in landscape mode. If you are running things in the simulator, it probably jumps back to portrait when you dismiss the full screen? This forces the app back to "portait" mode without triggering the normal "willRotate" functionality, and could possibly mess up your code for keeping track of orientations.
Also keep in mind that most apps needs to support all orientations on the iPad to get accepted, unless you're making e.g. a game which is normally specifically designed for either landscape or portrait.

What is the usual/preferred landscape orientation for iOS apps?

Is it UIInterfaceLandscapeLeft (Home button on left) or UIInterfaceLandscapeRight (Home button on right)?
Note that the need is to support only one of them.
Old question!! Anyway...
As you can read here, you should find something like this in the documentation.
A landscape-only application should support both landscape
orientationsthat is, with the Home button on the right or on the
left. If the device is already physically in a landscape orientation,
a landscape-only application should launch in that orientation.
Otherwise, a landscape-only application should launch in the
orientation with the Home button on the right by default.
If so, UIInterfaceLandscapeRight should be prefered.

Resources