Responding to User Changes

When the user changes the preferred text size, a notification gets posted that the application’s objects can register to listen for. This is the UIContentSizeCategoryDidChangeNotification, and this is a great time to update the user interface.

In BNRDetailViewController.m, register for this notification in initForNewItem: and remove the class as an observer in dealloc.

 ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​s​e​l​f​.​n​a​v​i​g​a​t​i​o​n​I​t​e​m​.​l​e​f​t​B​a​r​B​u​t​t​o​n​I​t​e​m​ ​=​ ​c​a​n​c​e​l​I​t​e​m​;​
 ​ ​ ​ ​ ​ ​ ​ ​}​

 ​ ​ ​ ​ ​ ​ ​ ​/​/​ ​M​a​k​e​ ​s​u​r​e​ ​t​h​i​s​ ​i​s​ ​N​O​T​ ​i​n​ ​t​h​e​ ​i​f​ ​(​i​s​N​e​w​ ​)​ ​{​ ​}​ ​b​l​o​c​k​ ​o​f​ ​c​o​d​e​ ​ ​ ​ ​ ​ ​ ​ ​N​S​N​o​t​i​f​i​c​a​t​i​o​n​C​e​n​t​e​r​ ​*​d​e​f​a​u​l​t​C​e​n​t​e​r​ ...

Get iOS Programming: The Big Nerd Ranch Guide 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.