Skip to content

Instantly share code, notes, and snippets.

@pablasso
Created January 27, 2012 18:18
Show Gist options
  • Save pablasso/1690133 to your computer and use it in GitHub Desktop.
Save pablasso/1690133 to your computer and use it in GitHub Desktop.
UIView animation
UIView *testView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)];
[UIView animateWithDuration:1.0f
animations:^{
testView.transform = CGAffineTransformTranslate(testView.transform, 100.0f, 0.0f);
}
completion:^(BOOL finished){
if (finished) {
// Do some magic after the animation finishes
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment