My application uses the NavigationController. On the back button press I would to check that a certain condition has been met. If it hasn't I want to warn the user that the work they've done won't be saved.
I'm trying to use the viewWillDisappear
function to perform the logic etc.
However, I'm unsure how to stop the navigation taking place if the user wishes to cancel it.