I am trying to move an image back to a certain point on the screen. I am using the following code:
[UIView beginAnimations:nil context:nil]; //Move To Start Position With Animation
[UIView setAnimationDuration:0.5];
plustwo.center = CGPointMake(36, 134);
[UIView commitAnimations];
The problem is that the image does not back to the correct point on the screen. I am initiating this from an if statement that states:if this image collides with another image(PanGestureRecogizer) it moves back to its place. Am I doing something wrong?
Thanks
I don’t know if u did wrong?
As you didn’t told the previous state of ur image if the co-ordinate you have given is the previous state then may be the u r using center here and image would have moved from origin, or if this code may not work.. so use this
and for more clear response, give clear question…