how to get imageview tp follow a dragging touch?

Discussion in 'iOS Programming' started by mandude, Jun 19, 2010.

  1. macrumors member

    Nov 19, 2009
    so i have a UIImageView that contains a PNG image on the bottom of the screen. The center point of this ImageView is the point (32, 420). I want it so that whenever the user touches this ImageView, the imageView instantly follows where ever the user's finger is, as long as the user's finger is touching the screen. If the user is dragging the image then lifts their finger up i want it also that the ImageView instantly returns with the center point of the ImageView being (32, 420). I belive i need something like -(void)touchesBegan...... i need some help putting this together thanks!

    all i have so far is the h. file code

    UIImageView *imageView;

    what should go in the m. file?
  2. macrumors 68030


    Sep 2, 2008

Share This Page