I want transform a view along Y axis. My code work fine But they back to its orginal postion after a sec.I am not needed this.
CABasicAnimation* animation =[CABasicAnimation animationWithKeyPath:@"transform.rotation.y"];
animation.fromValue = @(0);
animation.toValue = @( M_PI/4);
animation.repeatCount = 0.0;
animation.duration = 5.0;
[self.view.layer addAnimation:animation forKey:@"rotation"];
CATransform3D transform = CATransform3DIdentity;
transform.m34 = 1.0 / 500.0;
self.view.layer.transform = transform;
0 comments:
Post a Comment