转屏

//当前vc是否支持转屏

-(BOOL)shouldAutorotate

{

    return YES;

}

//支持哪些转屏

-(NSUInteger)supportedInterfaceOrientations

{

    return UIInterfaceOrientationMaskPortrait;

}

 

//当前viewcontroller默认的屏幕方向

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

{

    return ( UIDeviceOrientationLandscapeRightUIDeviceOrientationLandscapeLeft );

}

原文地址:https://www.cnblogs.com/xuaninitial/p/4894884.html