标签:
代码:
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.title=@"拍照动画";
}
//点击任何处,弹出动画
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
CATransition *shutterAnimation = [CATransition animation];
shutterAnimation.delegate = self;
shutterAnimation.duration = 0.5f;
shutterAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
shutterAnimation.type = @"cameraIris";
shutterAnimation.subtype = @"cameraIris";
[self.view.layer addAnimation:shutterAnimation forKey:@"cameraIris"];
}
标签:
原文地址:http://www.cnblogs.com/yang-guang-girl/p/4606995.html