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.
UIViewController
Now viewWillAppear>
viewWillAppear>
hm, maybe you can use self.isMovingToParentViewController in viewWillAppear, see docs, if it is NO then it means the current view controller is already on the navigation stack.
self.isMovingToParentViewController
viewWillAppear
NO