Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming
by Maurice Sharp, Erica Sadun, Rod Strougo
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access