2017-09-28 4 views
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私はこれを働かせますか?

答えて

0

あなたはXcodeプロジェクトの設定からオリエンテーションをオンにし、あなたのビューコントローラで次のプロパティを実装する必要があります。

override var supportedInterfaceOrientations: UIInterfaceOrientationMask { get { return .all } } 
+0

は、私が何をしたか厥、と私は私の質問であることを述べました。それは動作していません – Coder221

+0

あなたが速い3を使用している場合は、私が書いた方法とまったく同じようにプロパティを実装する必要があります。 実装方法はまったく異なります – Rendel

関連する問題