Say I have UIViewController
A and B.
User navigates from A to B with a push segue.
Than user presses back button and comes to A.
Now viewWillAppear
of A is called. Can I know in the code here that I came from back button (navigationController popTo...
) and not by another way? And without writing special code in the B view controller.
hm, maybe you can use
self.isMovingToParentViewController
inviewWillAppear
, see docs, if it isNO
then it means the current view controller is already on the navigation stack.