The Importance of Views

Our journey through app execution flow has delivered us so far to the point at which the app has launched, the initial screen is on display, and the app waits for user activity to get things going. This is a good time to begin thinking about user navigation around screens within an iOS app. In the web world, and regardless of how the content is generated, the page is king—the organization of a website or app tends to be divided into distinct pages of content, with each page presenting a related activity or subject area (e.g., the home page, the support page, the contact page). A highly dynamic page, of course, can cram multiple screenfuls of functionality into a single downloadable page—the ability to view a Gmail inbox list and compose a new message on the same page comes to mind, but even Gmail’s Help link takes you to a different page. And so, it is quite natural to approach a web browser programming task by thinking about page organization and how users will navigate from one page to another.

In an iOS app, however, the screen-sized view is king. Some apps, such as simple games, might keep users looking at just one view for all of the game play, but somewhere a button likely appears to show a different screen with a score history, instructions, or a list of other apps made by the same developer. The earlier you begin thinking about converting your app ideas into a series of full-screen views, the quicker you’ll be able to arrive at a good navigation plan. ...

Get Learning the iOS 4 SDK for JavaScript Programmers 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.