扫码关注官方订阅号
学习是最好的投资!
问题2的答案有了
@interface UIViewController (Rotate) @end @implementation UIViewController (Rotate) - (NSUInteger)supportedInterfaceOrientations { if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) return UIInterfaceOrientationMaskAll; return UIInterfaceOrientationMaskPortrait; } @end
这个答案是兼容 iOS7 的做法。在 iOS8 and above 中,旋转这个含义已经没有意义了。
问题一可不可以主做ios7然后向后兼容ios8
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
问题2的答案有了
这个答案是兼容 iOS7 的做法。在 iOS8 and above 中,旋转这个含义已经没有意义了。
问题一可不可以主做ios7然后向后兼容ios8