禁用当前屏幕的旋转? [英] Disabling rotation for current screen?
本文介绍了禁用当前屏幕的旋转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以为当前屏幕启用/禁用旋转参数,或者此属性适用于所有应用程序?
Is it possible to enable/disable rotation parameter for current screen or this property is for all application?
推荐答案
当然:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
//Choose your available orientation, you can also support more tipe using the symbol |
//e.g. return (UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight)
return (UIInterfaceOrientationMaskPortrait);
}
这篇关于禁用当前屏幕的旋转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文