piching and zoom

Discussion in 'iOS Programming' started by bkphat, Oct 2, 2008.

  1. bkphat macrumors newbie

    Jun 8, 2008
    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
  2. Taum macrumors member

    Jul 28, 2008

Share This Page