1

I could get the UIImage to move just a bit to the x -axis to the right and back to original position.

 -(void) uiview_anim
 {

[UIView beginAnimations:@"Move" context:nil];
[UIView setAnimationDuration:3];
[UIView setAnimationBeginsFromCurrentState:YES];
CGPoint a;

     a.x=finger.frame.origin.x;


a.x=a.x+10;              

finger.center=a;


[UIView commitAnimations];  
}

It also move the Y direction too, but I didn't specify that. I need it to snap back to the original position once moved. Finger is the UIImageView I am working on.

jason white
  • 687
  • 4
  • 11
  • 28
  • You should use the [animation based on blocks][1]. [1]: http://stackoverflow.com/questions/3126833/what-are-block-based-animation-methods-in-iphone-os-4-0 – Rui Peres Oct 20 '12 at 23:05

0 Answers0