Skip to content

Instantly share code, notes, and snippets.

@Air-Craft
Created March 28, 2015 11:23
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 Air-Craft/6419cda32affa445f890 to your computer and use it in GitHub Desktop.
Save Air-Craft/6419cda32affa445f890 to your computer and use it in GitHub Desktop.
CALayer rotate, slide, fade in #animation with perspective #transform #3d
_alertContainer.alpha = 0.0;
CATransform3D t = CATransform3DIdentity;
t.m34 = -1.0 / 700;
t = CATransform3DRotate(t, -40*M_PI/180., 1.0, 0.0, 0);
t = CATransform3DTranslate(t, 0, -0, -200);
_alertContainer.layer.transform = t;
[UIView
animateWithDuration:self.animDuration
delay:0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
_alertContainer.alpha = 1.0;
// _alertContainer.transform = CGAffineTransformIdentity;
_alertContainer.layer.transform = CATransform3DIdentity;
}
completion:^(BOOL finished) {
;
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment