chapter sixteen

Getting Input from Users: Alerts and Action Sheets

Providing Information to users about what’s happening with your app is an important part of the user experience. As pointed out in Chapter 15, “Telling Users the News: Alerts and NSError,” software in general is much less talkative and verbose than it used to be. In part this is because software, computers, and users are all more sophisticated about what’s going on. No longer do you need to ask a user to confirm every little step in a process because you and the user can more frequently assume—correctly—that things have gone as planned.

When you do need to notify the user of some issue, an alert is a blunt-force tool. It brings the app to a halt until the user dismisses it. In this chapter, you’ll begin to learn about the more flexible tools for communicating with the users. Rather than use the simple alert discussed in the previous chapter and shown in Figure 16-1, you’ll see how you can allow the user to communicate to you.

9781118570081-fg1601.tif

Figure 16-1 A simple alert presents information with a single button.

The basic tools are:

Alerts with multiple buttons—As soon as the user can choose between more than one button, you have provided a communication channel from the user to the app as shown in Figure 16-2. With one button, the only communication is that the user has seen the alert, but now the user is empowered to make ...

Get iOS 6 Foundations 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.