Created
December 25, 2013 14:48
-
-
Save ynechaev/8123871 to your computer and use it in GitHub Desktop.
UIView 3d transform animation style: horizontal flip
This file contains hidden or 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
UIView *myView = cell.containerView; | |
CALayer *layer = myView.layer; | |
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; | |
rotationAndPerspectiveTransform.m34 = 1.0 / -1000; | |
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, M_PI / 0.3, 0.0f, 1.0f, 0.0f); | |
layer.transform = rotationAndPerspectiveTransform; | |
[UIView animateWithDuration:1.0 animations:^{ | |
layer.transform = CATransform3DIdentity; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment