在继承自UIViewController的类中重写下面两个方法
- (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
// 想要设置的方向
return UIInterfaceOrientationMaskLandscapeRight;
#endif
}
// 允许自动旋转
- (BOOL) shouldAutorotate {
return YES;
}
在继承自UIViewController的类中重写下面两个方法
- (NSUInteger) supportedInterfaceOrientations{
#ifdef __IPHONE_6_0
// 想要设置的方向
return UIInterfaceOrientationMaskLandscapeRight;
#endif
}
// 允许自动旋转
- (BOOL) shouldAutorotate {
return YES;
}