Chapter 2. Alerts, Action Sheets, and Modal Views

WHAT'S IN THIS CHAPTER?

  • The role, design, and usage principles for the alert pop-up

  • The role, design, and usage principles for the action sheet

  • The role, design, and usage principles for modal views to present functionality

Alerts, action sheets, and modal views are temporary views that require immediate user attention. No other application action can take place until they are dismissed. Alerts notify the user of some event and usually provide two buttons: OK, to acknowledge, and Cancel, to dismiss. Action sheets usually present the user with a list of options beyond OK and Cancel. Modal views can be any view presented in a modal fashion, which means no other application operation can proceed until the modal view is dismissed — for example, choosing a song to play from a list. After the user makes a selection, the view is dismissed and the song begins to play.

To demonstrate the use of these three temporary views, this chapter provides five complete applications: one for the alert, two for the action sheet, and two for presenting views modally. The action sheet and modal view sections also provide an application for the iPhone as well as the iPad, because each device requires a slightly different design approach.

ALERTS

There is no question about the role of the alert in your applications. You use an alert when you need to inform the user about something critical that prevents normal operation of the application.

Two common uses of alerts ...

Get Professional iPhone® and iPad™ Application Development 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.