我在UITabbarcontroller中有一個UINavigationController。我想在UINavigationController中只旋轉一個視圖cotnroller。iOS 6.0中的設備方向UINavigationController
這是我正在使用的代碼片段。
-(NSUInteger)supportedInterfaceOrientations
{
if (CURRENTDEVICE == IPHONE)
return [self.navigationController supportedInterfaceOrientations] | UIInterfaceOrientationMaskAllButUpsideDown;
else
return UIInterfaceOrientationMaskAll;
}
-(BOOL)shouldAutorotate {
return YES;
}
我有UINavigationController的一個類別,以及:
#import "UINavigationController+autorotate.h"
@implementation UINavigationController (autorotate)
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
@end
我不知道如何實現它。