My IOS orientation acting very strange and won't listen to any programing-code?

63 Views Asked by At

As the title describes I am having a big "what the * is this" at my app atm. It seems I can't get the control over the orientation at all in the different slides. I can only manage the orientation in one way, via the info-plist file. The problem is, info-plist file sets the orientation for the whole app and I am not interested in that.In some slides I want to allow Landscape left/right and others only Portrait and this is not doable vie info-plist?

I have tried my best to understand the problem but I can not say I have gained any bigger "aha moment" so far. I am using UINavigatorbar and Tabbar in my IOS-app which may occur the problem. How can I make the app to start listening to the code in each-file so I can manage the orientation localy ?

1

There are 1 best solutions below

0
On

Are you using iOS 6? If so, the -shouldAutorotateToInterfaceOrientation method was deprecated.

You now have to override -supportedInterfaceOrientations and -preferredInterfaceOrientationForPresentation methods in order to manage screen orientation. You can do this globally or within individual view controllers.

See the UIViewController class reference for more details.