Skip to content

Instantly share code, notes, and snippets.

@siqin
Created September 28, 2012 08:33
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 siqin/3798656 to your computer and use it in GitHub Desktop.
Save siqin/3798656 to your computer and use it in GitHub Desktop.
Fade In and Fade Out
CATransform3D transform = CATransform3DMakeScale(0.001, 0.001, 1.0);
hintView.layer.transform = transform;
hintView.alpha = 0;
transform = CATransform3DMakeScale(1.0, 1.0, 1.0);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
hintView.layer.transform = transform;
hintView.alpha = 1;
[UIView commitAnimations];
CATransform3D transform = CATransform3DMakeScale(0.001, 0.001, 0.001);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDelay:0.0];
[UIView setAnimationDuration:.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
hintView.layer.transform = transform;
hintView.alpha = 0;
[UIView commitAnimations];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment