我正在演示一个名为homeController的视图控制器,如下所示:
let viewController = self.storyboard?.instantiateViewController(withIdentifier: "LoginController") as! LoginController
let navigationController: UINavigationController = UINavigationController(rootViewController: viewController)
present(navigationController, animated: true, completion: nil)
在显示的视图中,控制器的logincontroller在某些情况下会被解除:
self.dismiss(animated: true, completion: nil)
但是当它返回到Homecontroller时,它不会调用ViewWillAppear,我真的需要在它返回时检查Homecontroller的条件,所以当Logincontroller取消视图时,我如何调用ViewWillAppear?