iPad: Move UIView with animation, then move it back
- by Joel
I have the following code in a UIView subclass that will move it off the screen with an animation:
float currentX = xposition; //variables that store where the UIView is located
float currentY = yposition;
float targetX = -5.0f - self.width;
float targetY = -5.0f - self.height;
moveX = targetX - currentX; //stored as an instance variable so I…