0
votes

I have 2 root view controllers ViewController1 and TabBarController1(there are reasons for making 2 root view-controllers). ViewController1 only supports Portrait mode and TabBarController1 supports all orientations. ViewController1 appears first after launch. I am locking the orientation of ViewController1 using the following method.

- (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; }

The app launch and orientation worked fine with iOS7. When building the app through Xcode 6 in iPad(iOS8) following change is observed: - When app is launched in landscape mode, ViewController1 with orientation locked into portrait mode appears with half black screen and when TabBarController1 appears which supports all orientations, doesn't resize with proper dimensions on changing orientations. I have also tried overriding the above method in TabBarController1 to support all orientation but nothing works fine. This problem is not observed when launching the app on iPad in portrait mode. There is no problem when launching the app on iPhone as iPhone launches only in Portrait mode. What is the issue when working with iOS8 ?

1
Heyy. have you found a fix for this?anshul

1 Answers

0
votes

I am a newbie, so don't judge..

In ios8, apple changed 2 things :

1-

   [[UIscreen mainscreen] bounds].size 

This used to be a fixed value for portrait and landscape, now it is not. When u change from landscape to portrait the width and height switch.

2-What is happening with you. You cannot force a viewcontroller to be in portrait only if you set portrait and landscape in project settings, do not know why, so you maybe have to set portrait only in project settings for example.. This is happening on iPads and iphone 6+ only.

Hope this helped..