Pages

Wednesday, August 28, 2013

Animation in Xcode

Here is the global animation code in Objective C

First you need to set the position or size from stating animation 
then Write the below code to animate to its final size or origin

CGRect frameDeleteLabel = lblDeleteAccount.frame;
frameDeleteLabel.origin.y = 304;

[UIView animateWithDuration:1.2 delay:0 options:0 animations:^{
    lblDeleteAccount.frame = frameDeleteLabel;
    deleteAccountButton.frame = frameDeleteButton;
} completion:^(BOOL finished) {
}];