Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Hour 10. Getting the User’s Attention > Exploring User Alert Methods

Exploring User Alert Methods

Because all the logic for implementing alerts, action sheets, or System Sound Services is contained in small, easy-to-understand chunks of code, this hour’s project is a bit different. We treat this hour’s project like a sandbox. We set it up, and then spend a good amount of time talking about the code that needs to be written to make it work, and we test it along the way.

You’ll generate alert views, alert views with multiple buttons, alert views with fields, action sheets, sounds, and even vibrate your device (if it’s an iPhone or a yet-unreleased iPad, that is).

Implementation Overview

Unlike other projects where our UI design was intimately tied to the code, this tutorial’s interface is rather inconsequential; we’re simply interested in creating buttons to trigger actions that demonstrate the different alert methods and providing a single output area so we can see how the user responded. Everything to generate alert views, action sheets, sounds, and vibrations is handled entirely in code, so the sooner we get the framework set up for the project, the sooner we can get to the implementation logic.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial