Chapter 8. Moving, rotating, editing, and animating images

 

This chapter covers

  • Animating image views
  • Using gestures to manipulate images
  • Compositing a new image

To start out, you kept Disguisey simple, but you can do much more to improve it. Before you can post it to the App Store, you need to polish it. If you’ve been playing around with it, the first thing you’ll notice is that it’s hard to position the mustache on the right part of the face. It would be great if you could move it around. Also, disguises don’t match all face sizes, so being able to resize the image would be nice, too.

You’re going to look at some of these problems and a few others. Spend a minute or so playing with Disguisey and thinking about the features you think it needs. We might not cover all of them here, but you should try to sketch, design, and code them yourself.

Improving Disguisey

Improving any app is similar to writing it in the first place but can be a lot more fun. When you’re first building it, it takes a while to get a working app that does anything at all. But a lot of improvements require just small bits of extra code.

Sketching your new ideas

To start with, you learned in chapter 5 that iPhone apps use simple animations to make them come alive. There’s a definite feel to well-done apps, and it comes in part from good use of simple animations. Instead of plopping the mustache down on the face, how about you make it grow in place, as shown here.

Figure 8.1. Animating the mustache placement

Using animation to make disguises grow

 
 
 

Recognizing touch gestures

 
 
 
 

Saving the disguised face

 
 
 

Moving on from Disguisey

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage