In Chapter 13 (and subsequent chapters), there seems to be a problem with dismissing the keyboard in the detailViewController view. I found a solution and thought I’d post it here in case other people are having the same problem (unless I missed something, perhaps this should be posted to the errata)
When adding a new item, detailViewController view will not dismiss its keyboard when clicking the view or pressing return. After some digging I found that when the view controller is set to UIModalPresentationFormSheet, it will not allow keyboard dismissal. You have to create a subclass of UINavigationController that overrides disablesAutomaticKeyboardDismissal.
See: developer.apple.com/library/ios/ … rence.html#//apple_ref/occ/instm/UIViewController/disablesAutomaticKeyboardDismissal
I just implemented one method in my new subclass:
and used the new class for “navController” in addNewItem:. This did the job.