I have an app that presents a “Show Route” button (between present location, and another location previously fixed). Ok, if the user taps the show route button, the map opens, and makes the zoom, and everything goes ok. BUT, if the user tabs “back” button before the zoom movement is completed, then the app crashes.
How could I avoid the user to press the back button? Is there any way to hide it to the user?
Thank you.
PD: This is the crash:
-[RutaViewController respondsToSelector:]: message sent to deallocated instance 0x10227c30
Then, the app simply freezes, not showing an EXC_BAD_ACCESS nor SIGABRT signal…
To fix the crash, try setting your mapView’s delegate to nil in your view controller’s
viewWillDisappearmethod.