Understanding App Structure
Although there are many possible ways to structure an app, all apps share some common elements. They’re shown in Figure 4.6.
Here’s how each object in the structure handles messages:
iOS sends app-level messages to the Application Delegate object. These messages arrive as the app is launched and loaded, when it’s moved to the background after the user presses the Home button, or when some other app-level event happens, such as a low memory condition.
The App Delegate includes a window object. In iOS apps, the window object is just a placeholder for other content. It doesn’t have a frame around it, it can’t be moved, and it doesn’t have open/close/minimize/maximize buttons. It has a small repertoire of messages, but they’re not often used.
4.6 An outline structure of an iOS app.
iOS sends screen control and animation messages to the View Controller object. The View Controller loads and unloads screen content as the app runs, with optional animations. It can also respond to user touch events from the screen, and it manages screen rotations.
View objects are ...