Swift: 在过渡到下一个视图控制器期间重新显示当前视图控制器

Swift: Current View Controller is re-displayed during transition to the next View Controller

当我从视图控制器 A 调用视图控制器 B (ProfileController) 时,使用 self.present(navControllerProfile, animated: false, completion: nil),视图控制器 A 在切换到 B 之前快速再次显示。我使用相同的代码调用其他从 View Controller A 的 View Controllers 和过渡工作完美,只有到 B 的过渡呈现这个 "bug"。有没有人想出类似的问题并设法解决它?谢谢。

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)
}

经过多次测试,无法查出问题的原因,最终在link中应用HotJard提出的解决方案解决了这个bug: