UITabbarcontroller에 UINavigationController가 있습니다. UINavigationController 내에서 하나의 뷰 뷰 핸들러 만 회전하려고합니다.iOS 6.0의 장치 방향 UINavigationController
다음은 현재 사용중인 코드입니다.
#import "UINavigationController+autorotate.h"
@implementation UINavigationController (autorotate)
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
@end
내가 그것을 구현하는 방법을하지 확신 :
-(NSUInteger)supportedInterfaceOrientations
{
if (CURRENTDEVICE == IPHONE)
return [self.navigationController supportedInterfaceOrientations] | UIInterfaceOrientationMaskAllButUpsideDown;
else
return UIInterfaceOrientationMaskAll;
}
-(BOOL)shouldAutorotate {
return YES;
}
은 나뿐만 아니라 UINavigationController가에 대한 범주가 있습니다.