0
我想查看我的應用程序在所有方向,所以我選擇了General
下的所有orientaitons,然後在Xcode Project Settings
倒掛方向不旋轉爲縱向
選擇info.plist
下的所有orientaitons我這樣做是在AppDelegate中
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return UIInterfaceOrientationMask.all
}
,並將此在Viewcontroller
func supportedInterfaceOrientations() -> Int{
return Int(UIInterfaceOrientationMask.all.rawValue)
}
所有其他orientati ons正在工作,但顛倒orientation.I如何得到這個工作?
那是我做什麼,我在我的問題提到。它不起作用 – Coder221
如果您使用的是swift 3,則必須按照我寫下的方式來實現該屬性。 你實施的方式完全不同 – Rendel