iOS 8 Screen slides wrong direction when back button tapped - ios

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.

Related

iOS 8 rotation hides status bar, iOS 7 works fine

I have an app that I need to restrict one screen to be portrait only. I do this by always returning no in shouldAutoRotate. However, on iOS 8, when I rotate the device, it hides the status bar, but keeps the rest of the view locked to portrait.
In iOS 7, everything works fine. Nothing rotates when I rotate the device any which way.
I've tried disabling rotation system wide, and that works fine, so somehow, in iOS 8, the rotation separately checks for the views and then for the status bar to rotate (or maybe for the navigation controller, which includes the status bar? I'm not sure.)
Any help or ideas as to where to look to get my status bar to also lock to portrait in iOS 8 would be greatly appreciated!
Edit: So, it seems what is going on is that my VC is not rotating, its views are staying the same. However, the status bar orientation is changing from portrait to landscape. I'm figuring this out using NSLogs to check out the orientation, and even though shouldAutoRotate is returning NO no matter what, the status bar is still changing orientation.
Any ideas on how to stop the status bar from also rotating would be great!

UISplitViewController master slide in only works after rotation

I am working with a UISplitViewController, and the master is set to be hidden on portrait orientation. In that orientation, the app should open the master view controller with a swipe from left to right gesture.
The problem is that this is not happening unless I rotate the device. If the app starts on landscape, I change to portrait and it works properly (since one rotation was made). If the app starts already on portrait, I need do change to landscape then back.
How can I make it work since the app is opened?
That seems to be the default behavior. Re-setting the delegate upon rotation seems to fix it.

iPad App Portrait Only?

My app is entirely designed for IOS6. I use an xib for the iPhone and another one for the iPad. My AppDelegate sets up a TabBarController, though there is no class for the TabBarController itself. The TabBarController has two tab items, 1 a NavigationController, and 1 a View Controller, each of which has its own class. I would like the iPad to be able to run in just Portrait mode, upside down, and normal. On the summary tab of Target in Xcode, I have supported interface orientations set to Portrait and Portrait Upside Down.
My understanding with iOS 6 is that you only need to put
- (NSUInteger)supportedInterfaceOrientations
in the highest parent controller of a class, and set which Masks you would like it and all the child containers to work with. So, in the Root View Controller of the Navigation Controller I put:
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait|UIInterfaceOrientationMaskPortraitUpsideDown;
}
And in each of the child classes, I put:
- (BOOL)shouldAutorotate{
if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
{
return YES;
}
else
{
return NO;
}
}
I then put the same two methods in the 2nd Tab which was just a View Controller Class.
I installed the app on my iPad, and it worked fine in portrait mode, but did not rotate when I turned it upside down. I exited the app and turned the iPad upside down, but when I started the app again, it still stayed in the same spot. So, I killed the app completely, and started it from the beginning upside down. The splash screen was upside down, but when the screen disappeared, the app was still only showing in portrait mode, making the display upside down.
What am I missing?
click on appName select Target and just select the orientations which you want to support. thanks
The code above is great for pre iOS 6. For iOS 6 you have to use the mask orientation. If you want all of the views in iPad to rotate or just some you have the choice of using the above answer. If you want to hard code it the check my answer in the following link for a detailed code for autorotation of all masks or just rotate one view and let the others don't rotate. Any how here is the link
iOS 6 supportedInterfaceOrientations issue
The above answer is providing you with the right solution as well but if you want to learn how to code it check my answer in the link above. Happy coding.
Is the Rotation Lock enabled or not ? (If you are new to iOS, double tap the home button, and slide to the right: it's the little metal-styled button in shape of an arrow).
If you want to run your application to run on portrait mode only than,
1. Select Your Target.
2. In General -> Development Info -> Device Orientation Uncheck all other orientation.Portrait mode only should be checked.Than run your project.

Customized navigation bar buttons freezing after stand by

I am having a strange problem.I have used customized navigation bar(for which I have used another ViewController separately) in my project which has ofcourse navigation buttons.
As the device becomes active after stand by,it normally becomes active in portrait mode by default. And if we have held the device in some other orientation,it rotates to that orientation and every thing works fine. Even the navigation bar buttons.
Now here is the problem. If the device is held in Portrait mode after stand by,it freezes the navigation bar buttons. As far as I have concluded,this is because the application gets active in portrait mode by default and since the device is also held in Portrait mode,it can not find any orientation to rotate and hence freezes the buttons.Except navigation bar buttons,everything works fine.And if I rotate the device,like I have said,Everything works fine.
Dont have any idea,why this is happening.Can someone explain?

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

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.

Resources