On a UINavigationController I have two view controllers 1 and 2. There is a Show segue from 1 to 2 and one programmatic unwind segue (control+drag from the scene's view controller icon to its exit icon) from 2 to 1.
How can I know when the 2 is just about to be popped of the UINavigationController stack?
viewWillDisappear
, is also called when another view is pushed onto the UINavigationController stack so it's not a solution. I've seen an answer on SO suggesting to create back button rather than making use of the default back button, but I am wondering is there no system method I can use to find out when a UIViewController is popped off the stack?