Я делаю приложение на основе фотографии, я использовал анимацию затвора для достижения прогресса.изменение цвета затвора анимация iphone
вот мой код ..
- (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 поделиться своими знаниями и помочь мне.