码迷,mamicode.com
首页 > 移动开发 > 详细

code4App-01-拍照动画

时间:2015-06-29 11:37:06      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:

 

 

代码:

- (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"];
    
}

 

code4App-01-拍照动画

标签:

原文地址:http://www.cnblogs.com/yang-guang-girl/p/4606995.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!