State Restoration Life Cycle

Now that you are working with state restoration, the application life cycle is going to be a bit different, as you can see in Figure 24.3. Currently, all of your window and rootViewController code is in application:didFinishLaunchingWithOptions:, but with state restoration, it will spread out a bit.

Figure 24.3  Restoration life cycle

Restoration life cycle

The method application:willFinishLaunchingWithOptions: gets called before state restoration has begun. You should use this method to set up the window and do anything that should happen before state restoration.

In BNRAppDelegate.m, override this method to initialize ...

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.