1. app->target->Deployment Info->Device Orientaion,
![](https://img.haomeiwen.com/i18924998/e37d23c0a928823f.png)
2. 在AppDelegate.swift添加如下代码
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return .landscape
}
1. app->target->Deployment Info->Device Orientaion,
2. 在AppDelegate.swift添加如下代码
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return .landscape
}
本文标题:swift5下app强制横屏
本文链接:https://www.haomeiwen.com/subject/eclnphtx.html
网友评论