I have A UINavigationController which is managing multiple UIViewControllers. When at the top of the view controller hierachy, and when back is pressed, I want to show a UIAlertView to ask the user if they are sure that they want to go back. What is the best way to check if the view is popped?
I have A UINavigationController which is managing multiple UIViewControllers. When at the top of
Share
This can be done by subclassing UINavigationController and overriding
(BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item{
}
overriding popViewControllerAnimated: is too late to cancel a pop.