1.在項(xiàng)目的target里設(shè)置【去除勾選支持的方向】,還需要勾選Full Screen選項(xiàng)【默認(rèn)沒有勾選桑腮,此時需要勾選】在 Target
里面:
image.png
- 在
AppDelegate
里面:
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return .portrait
}