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