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.isMovingToParentViewControllerinviewWillAppear, see docs, if it isNOthen it means the current view controller is already on the navigation stack.