18:37
0


- (BOOL)shouldAutorotate
{
return YES;
}

CODE  : Portrait :
- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait;
}

or

CODE  : Landscape :

- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}


if  invoked but the interface still rotates, try add UINavigationController method


@implementation UINavigationController (rotation)
//temp hack for iOS6, this allows passing supportedInterfaceOrientations to child viewcontrollers.
- (NSUInteger)supportedInterfaceOrientations {
    return [self.topViewController supportedInterfaceOrientations];
}
@end

0 comments:

Post a Comment