2013-03-30 4 views
1

나는 사진 기반 응용 프로그램을 만들고 있는데, 진행을 위해 셔터 애니메이션을 사용했습니다.셔터 애니메이션 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]; 
} 

내 출력은 다음과 같다.

enter image description here

는하지만 난 shutter.Please의 블랙 색상을 변경하여 지식을 공유하고 저를 도와주고 싶어.

답변

0

카메라 아이리스가 "color"속성을 노출하지 않으면 아이리스 블레이드의 색상을 임의로 변경할 수 없다는 것을 확신합니다. 그 작품은 OS에 내장되어 있으며 정적입니다.

아이리스 블레이드의 색상을 변경할 때 설정하면 자신의 그래픽 (which other people have had to do, too)으로 자신 만의 애니메이션을 수행해야 할 수 있습니다.