0
コードに応じて異なるViewControllerを表示するAppdelegateのdidFinishLaunchingWithOptionsメソッドにいくつかのコードがあります。このコードアニメーションを追加した後、向きが変わっても表示されません。しかし、このコードを削除するとアニメーションが表示されます。誰かがこれを修正する方法を教えてください。これがコードです。オリエンテーションオリエンテーションが変更されるときにアニメーションが表示されないSwift
self.window = UIWindow(frame: UIScreen.main.bounds)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
var vc:UIViewController
if (UserDefaults.standard.object(forKey: "Person") as? Bool) == nil {
vc = storyboard.instantiateViewController(withIdentifier: "FirstNavigationView")
}else{
vc = storyboard.instantiateViewController(withIdentifier: "MainView")
}
self.window?.rootViewController = vc
self.window?.makeKeyAndVisible()
あなたがこの変更の前にRootviewControllerを設定していて、rootviewControllerで設定するための任意NavigationControllerを使用していないどのように私をさせることができますを与えますあなたのプロジェクト – Aashish1aug