swift5下app强制横屏

1. app->target->Deployment Info->Device Orientaion,


1

2. 在AppDelegate.swift添加如下代码

func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {

        return .landscape

}

你可能感兴趣的:(swift5下app强制横屏)