This is the flow:
VC1
->(PUSH)-> VC2
->(PUSH) -> VC3
When clicking a button in VC3
I am calling the method below and it works properly - taking me back to VC1
:
self.navigationController?.popToRootViewController(animated: false)
But the problem is in viewWillAppear()
method in VC1
which is not being called.
Is there any solution to call it?
i am not exactly sure but
viewWillAppear()
will called while loading controller. it's not calling while dismiss other controller.so, you need to trycustom Delegate
orNotification observer
.