Taking Control with Breakpoints
At this point, you might be looking at this and thinking, “There is something wrong with this. My Spidey sense detects Code Smell.” Trust your Spidey sense. This solution is fraught with potential problems for your project.
Even if this approach has uncovered the bug, we’ve sprinkled nasty print statements all over our project. Ideally, we should never include a print command in code that we send to Apple. Although they may help for debugging, print statements do nothing for the end user, and are thus inefficient and slow our app for absolutely no reason. Additionally, any code we add to our project opens up the possibility of breaking something. What’s the point of using something that might break our code ...
Get iOS 10 SDK Development, 1st Edition 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.