动画
[UIViewbeginAnimations:nilcontext:nil];
[UIViewsetAnimationDuration:2];
[UIViewsetAnimationDelegate:self];
CAKeyframeAnimation * animation;
animation = [CAKeyframeAnimationanimationWithKeyPath:@"transform"];
animation.duration = 2;
animation.delegate = self;
animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;
NSMutableArray *values = [NSMutableArrayarray];
[values addObject:[NSValuevalueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
[values addObject:[NSValuevalueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
[values addObject:[NSValuevalueWithCATransform3D:CATransform3DMakeScale(0.4, 0.6, 0.2)]];
[values addObject:[NSValuevalueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
animation.values = values;
[self.view.layer addAnimation:animation forKey:nil];
[UIViewcommitAnimations];