Opting In to State Restoration

State restoration is disabled by default in applications. To enable state restoration, you must opt in within the application delegate.

Open BNRAppDelegate.m and implement the two delegate methods to enable state saving and restoration.

@​i​m​p​l​e​m​e​n​t​a​t​i​o​n​ ​B​N​R​A​p​p​D​e​l​e​g​a​t​e​

-​ ​(​B​O​O​L​)​a​p​p​l​i​c​a​t​i​o​n​:​(​U​I​A​p​p​l​i​c​a​t​i​o​n​ ​*​)​a​p​p​l​i​c​a​t​i​o​n​ ​ ​ ​ ​ ​ ​ ​ ​s​h​o​u​l​d​S​a​v​e​A​p​p​l​i​c​a​t​i​o​n​S​t​a​t​e​:​(​N​S​C​o​d​e​r​ ​*​)​c​o​d​e​r​ {​ ​ ​ ​ ​r​e​t​u​r​n​ ​Y​E​S​;​ }​ -​ ​(​B​O​O​L​)​a​p​p​l​i​c​a​t​i​o​n​:​(​U​I​A​p​p​l​i​c​a​t​i​o​n​ ​*​)​a​p​p​l​i​c​a​t​i​o​n​ ​ ​ ​ ​ ​ ​ ​ ​s​h​o​u​l​d​R​e​s​t​o​r​e​A​p​p​l​i​c​a​t​i​o​n​S​t​a​t​e​:​(​N​S​C​o​d​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.