This code moves a button called “shareCurrentlyBtn” 150 pixels in the Y (vertical) direction. This code handles the animation programatically.

CGPoint newCurrentlyCenter = CGPointMake( shareCurrentlyBtn.center.x, shareCurrentlyBtn.center.y - 150);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0f];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
shareCurrentlyBtn.center = newCurrentlyCenter;
[UIView commitAnimations];

Leave a Reply

Your email address will not be published. Required fields are marked *