Skip to content

Instantly share code, notes, and snippets.

@NikolaKirev
Created March 25, 2013 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NikolaKirev/5236003 to your computer and use it in GitHub Desktop.
Save NikolaKirev/5236003 to your computer and use it in GitHub Desktop.
Simple UIView ANimation with blocks - iOS
[UIView animateWithDuration: 0.9 delay: 0 options: UIViewAnimationOptionCurveEaseInOut animations: ^(void)animations{
CGPoint newCenter = CGPointMake(self.greenView.center.x + 180, self.greenView.center.y + 260);
[self.greenView setCenter: newCenter];
}completion:^(BOOL finished){
//this code is called after the aminations have completed
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment