禁止某个控制器横屏

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {//横竖屏的限制
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
        return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight ;
    }else{
        return UIInterfaceOrientationMaskPortrait;
    }
}

你可能感兴趣的:(禁止某个控制器横屏)