作为标题,我想知道现在是否可以在iOS 9中以编程方式锁定方向?这对我的应用程序至关重要,但我找不到方法。谢谢。
发布于 2015-11-26 04:43:23
使用supportedInterfaceOrientations和preferredInterfaceOrientationForPresentation来管理方向,例如
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
return UIInterfaceOrientationPortrait;
}https://stackoverflow.com/questions/32571857
复制相似问题