美文网首页
横竖屏dismissViewControllerAnimated

横竖屏dismissViewControllerAnimated

作者: tabor_570b | 来源:发表于2019-10-10 16:27 被阅读0次

需要在两个控制器实现相应的屏幕支持方向:

- (BOOL)shouldAutorotate {

 return NO;

}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

 return UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortrait;

}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {

 return UIInterfaceOrientationPortrait;

}

这是前一个控制器要实现的

- (BOOL)shouldAutorotate {

    return NO;

}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {

    return UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortrait;

}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {

    return UIInterfaceOrientationLandscapeRight;

}

这是后一个控制器要实现的

相关文章

网友评论

      本文标题:横竖屏dismissViewControllerAnimated

      本文链接:https://www.haomeiwen.com/subject/qjtnxftx.html