Application States, Transitions, and Multitasking

To know when an application should save its data to filesystem, it helps to understand the states that an application can be in as well as the transitions between them.(Figure 15.5).

Figure 15.5  States of typical application

States of typical application

When an application is not running, it is in the not running state, and it does not execute any code or have any memory reserved in RAM.

After the user launches an application, it enters the active state. Its interface is on the screen, it is accepting events, and your code is handling those events. There is also an inactive state that is similar to the active state, except ...

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