Reputation: 41
I tring to make app support all orientation. Its working fine but only upside down orientation is not working. I am using ios7. For upside down the view does not rotate. I tried following code
-(BOOL)shouldAutorotate
{
return yes;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll; // etc
}
My only second method is called but not first method. In infoPlist I enabled all the supported orientations.
Upvotes: 2
Views: 1445
Reputation: 9538
Found the fix. Sourced mainly from: https://stackoverflow.com/a/12758715/394969
In a nutshell for people who land here first:
/* In your view controller */
// Add support for upside down
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
Also flip on all device orientations in project settings as outlined in @Jignesh Mayani's answer. If that doesn't immediatley fix your issue check the link above for how to work with nav controllers and tab controllers (they all must support the required interface orientations).
Upvotes: 5
Reputation: 7213
Confirm that you have check, Go your project setting and Check
Upvotes: 0