Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bkphat

macrumors newbie
Original poster
Jun 8, 2008
17
0
Sorry in advance to bother you all with this question, but I have exhausted by resources.

Let's say I wanted to pinch an image in a view and scale it dynamically as the fingers are moving. Eg like the google maps app or the photo app.

Before I proceed, is there any sample code on such a thing out there?

Anyway, this is what I have so far that doesn't work:

I have a method converts the distance between two fingers into a euclidean distance.

As the fingers move, I take a ratio of the new distance between fingers and old distance between fingers. I then transform the picture with this ratio using one of the MakeScale functions.

Somehow this looks really bad when executed.

I realized that the maps/photo app must do something differently. Maybe it tracks each finger separately?

Any help would be appreciated.

thanks much
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.