Created
July 5, 2011 02:29
-
-
Save xissburg/1064166 to your computer and use it in GitHub Desktop.
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
- (void)tapAction:(UITapGestureRecognizer *)sender | |
{ | |
CATransform3D t = CATransform3DIdentity; | |
t = CATransform3DRotate(t, -M_PI/6, 0, 0, 1); | |
t = CATransform3DTranslate(t, 0, 200, 0); | |
[CATransaction begin]; | |
[CATransaction setCompletionBlock:^(void) { | |
[CATransaction begin]; | |
[CATransaction setValue:[NSNumber numberWithDouble:1] forKey:kCATransactionAnimationDuration]; | |
self.maskLayer.transform = CATransform3DIdentity; | |
self.squareView.layer.transform = CATransform3DIdentity ; | |
[CATransaction commit]; | |
}]; | |
[CATransaction setValue:[NSNumber numberWithDouble:1] forKey:kCATransactionAnimationDuration]; | |
self.maskLayer.transform = t; | |
self.squareView.layer.transform = t; | |
[CATransaction commit]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment