Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upside down orientation not working in iOS6 for UINavigation view and UITabbar view?

I created an app in ios 6 with navigation view.Also I have set all orientation options in the application summary and even used the

 -(BOOL) shouldAutoRotate

and

-(NSUInteger) supportedInterfaceOrientaion

methods in my view controller.when I run my app orientation works fine except upside-down.What should I do to also support upside-down.

I also facing the same problem when I add UITabBar controller.

Please share your ideas.

Thank you

like image 671
NSUserDefault Avatar asked Nov 28 '12 11:11

NSUserDefault


2 Answers

Hai I have found solution for my problem

Solution: For the app which consist UINavigation controller, just I created a category for UINavigation Controller class and I defined these methods

-(BOOL) shouldAutorotate{
    return YES;
}

-(NSUInteger) supportedInterfaceOrientations{

    return UIInterfaceOrientationMaskAll;
}

After adding this, all orientation were supported in my app.

The same, I done for UITabBar Controller also.This too worked for me by creating category for UITabBar Controller.

Thank you.

like image 73
NSUserDefault Avatar answered Oct 13 '22 21:10

NSUserDefault


Phone apps traditionally don't support upside down (why would you hold the phone upside down?) - the default project will support portrait and both landscape options, but not upside down.

Change this in the project info viewer in Xcode and you should be fine. There is a visual representation of the supported orientations, and upside down will be unselected.

like image 41
jrturton Avatar answered Oct 13 '22 22:10

jrturton