IOS 实现UIAlertView弹出动画

+(void)exChangeOut:(UIView *)changeOutView dur:(CFTimeInterval)dur{
02  
03     CAKeyframeAnimation * animation;
04     animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
05  
06     animation.duration = dur;
07  
08     //animation.delegate = self;
09  
10     animation.removedOnCompletion = NO;
11  
12     animation.fillMode = kCAFillModeForwards;
13  
14     NSMutableArray *values = [NSMutableArray array];
15  
16     [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.1, 0.1, 1.0)]];
17  
18     [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.2, 1.2, 1.0)]];
19  
20     [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(0.9, 0.9, 0.9)]];
21  
22     [values addObject:[NSValue valueWithCATransform3D:CATransform3DMakeScale(1.0, 1.0, 1.0)]];
23  
24     animation.values = values;
25  
26     animation.timingFunction = [CAMediaTimingFunction functionWithName: @"easeInEaseOut"];
27  
28     [changeOutView.layer addAnimation:animation forKey:nil];
29  
30 }

你可能感兴趣的:(ios,uialertview,弹出动画)