设置APP运行界面为竖屏,禁止屏幕旋转
2019-02-18 本文已影响0人
center11
Android:
在AndroidManifest.xml里声明Activity的时候加上一个属性:android:screenOrientation=" portrait",
IOS:
Targets—>General—>Deployment Info
修改AppDelegate.m,增加以下代码:
- (UIInterfaceOrientationMask) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
return UIInterfaceOrientationMaskPortrait;
}
�