O'Reilly logo

iOS App Development Portable Genius by Richard Wentk

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

bullet_2c.tif 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.

bullet_2c.tif 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.

9781118462133-fg0406.eps

4.6 An outline structure of an iOS app.

bullet_2c.tif 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required