Moving On to the Debugger
Instruments showed a call to viewWillAppear:
, a part of the view-opening cycle, and that gives you a place to start with the debugger. To be safe, put a breakpoint in both viewDidLoad
and viewWillAppear:
in ViewCarTableViewController.m
. Optionally, you can practice editing breakpoints and set the ignore count to 1 since you know the first call works.
Run the app and reproduce the crash. If you did not set an ignore count, or if you have to try multiple times to reproduce the condition, continue using the keyboard shortcut Ctrl-Cmd-Y instead of the Product > Debug submenu.
The app crashes, but it does not hit one of the breakpoints. That gives you a possible clue. You need to look at what you know:
UINavigationController ...
Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.