在开发iPhone应用的过程中,如何简单的适配iPad(禁止ip
2018-09-23 本文已影响123人
杨闯
开发应用中,如果需要应用禁止横屏,除了在项目的target里设置【去除勾选支持的方向】,还需要勾选Full Screen选项【默认没有勾选,此时需要勾选】,然后在AppDelegate中加入代码:
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}