// 直接把代码写在控制器内部即可,方法都是系统自动调用的
#if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_9_0
- (NSUInteger)supportedInterfaceOrientations
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
#endif
{
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
// return UIInterfaceOrientationLandscapeLeft;
return UIInterfaceOrientationLandscapeRight;
}
-(BOOL)shouldAutorotate
{
return NO;
}