When I call View Controller B (ProfileController
) from View Controller A, using self.present(navControllerProfile, animated: false, completion: nil)
, View Controller A is displayed again quickly before switching to B. I use the same code to call other View Controllers from View Controller A and the transition works perfectly, only the transition to B presents this "bug". Has anyone ever come up with a similar problem and managed to solve it? Thank you.
if self.view?.window == nil {
self.window = UIWindow(frame: UIScreen.main.bounds)
}
self.view.window?.layer.add(self.transition, forKey: kCATransition)
if let profileInstantiated = self.storyboard!.instantiateViewController(withIdentifier: "ProfileController") as? ProfileController{
let navControllerProfile = UINavigationController(rootViewController: profileInstantiated)
//Transition with "bug" bellow
self.present(navControllerProfile, animated:false, completion: nil)
}