我正在制作一个基于摄影的应用程序,我已经使用了快门动画的进展。
这是我的代码..
- (void)viewDidLoad
{
    [super viewDidLoad];
    [self performSelector:@selector(makeRound) withObject:nil afterDelay:2.0];
}
-(void)makeRound
{
    [[[self.view viewWithTag:90] layer] setMasksToBounds:YES];
    [[[self.view viewWithTag:90] layer] setCornerRadius:75.0];
    [[[self.view viewWithTag:90] layer] setBorderWidth:2.0];
    [[[self.view viewWithTag:90] layer] setBorderColor:[[UIColor blackColor] CGColor]];
    [(UILabel *)[[self.view viewWithTag:90] viewWithTag:991] setText:@"Loading.."];
    [self shutter];
}
-(void)shutter
{
    CATransition *shutterAnimation = [CATransition animation];
    [shutterAnimation setDelegate:self];
    [shutterAnimation setDuration:1.5];
    [shutterAnimation setType:@"cameraIris"];
    [shutterAnimation setValue:@"cameraIris" forKey:@"cameraIris"];
    [shutterAnimation setRepeatCount:1];
    [[[self.view viewWithTag:90] layer] addAnimation:shutterAnimation forKey:@"cameraIris"];
}
-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
{
    [self performSelector:@selector(shutter) withObject:nil afterDelay:0.5];
}我的输出是这样的。

但是我想改变shutter.Please这个黑色的颜色,分享你的知识并帮助我。
发布于 2013-03-30 18:20:23
除非相机虹膜暴露了一个"color“属性,否则我敢肯定你不能随意改变虹膜刀片的颜色。该图稿内置于操作系统中,并且是静态的。
如果要更改虹膜叶片的颜色,则可能需要使用自己的图形(which other people have had to do, too)制作自己的动画。
https://stackoverflow.com/questions/15717305
复制相似问题