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
  • PrintPrint
Share this Page URL
Help

10. Camera, Map Kit, and Core Location: ... > Prompt the user with action sheets

Prompt the user with action sheets

Action sheets slide up from the bottom of the page and give the user options to proceed. It’s similar to a modal view because the user has to address the action sheet before she can move on to anything else. Action sheets are really straightforward to use: they take strings for their buttons and have built-in animations for appearing and disappearing. Our code for the action sheet has some standard stuff included:

image with no caption

Use action sheets to let the user pick the image source

We know that our options are to use the camera, use the photo library, or cancel, so we’ll need to implement the behavior for each option.

image with no caption

Sharpen your pencil

Time to implement the action sheet. There’s a lot here to think about since we’re changing the flow of the app a bit.


  

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