Chapter 7. Creating a photo-based application

 

This chapter covers

  • Using tab-based navigation
  • Getting images from the Photos application
  • Detecting touch positions

I know that when I (Lou) want to liven up my day, I put on a fake mustache and a rainbow wig. But sometimes, when you need them, they’re hard to find. That’s where the next app, Disguisey, fits in. Disguisey lets you look through your photo album for a picture of a face and then add a fake mustache, beard, wig, funny hat, or tattoo to it.

You already know a lot about how to make Disguisey. Like every app, it has models, views, and controllers. You’ll see a couple of new types, but it’s basically the same. You’ll still use outlets and actions to connect the view to your code, but you’ll also see how to get more information about touches when you need it.

Designing the application

You need to do two basic things in Disguisey. First, you need to be able to grab a picture of a face from your Photos application. Second, you need to be able to pick a mustache, beard, wig, or tattoo from a disguise palette and place it on the face. One way to organize this app is as a group of tabs: one for the face and three for the elements of the disguise. That way, the user has freedom to explore their options.

Sketching Disguisey

Creating an app with tab-based navigation

 
 
 

Incorporating models

 
 

Working with photos

 
 
 

Wrapping it up, and what’s next

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage