Created
March 28, 2015 11:23
-
-
Save Air-Craft/6419cda32affa445f890 to your computer and use it in GitHub Desktop.
CALayer rotate, slide, fade in #animation with perspective #transform #3d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_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