2012-01-24 2 views
9

UIViewAnimationOptionAutoreverse 나는 재생 아이콘을 펄스 기능을 실행 해요 :animateWithDuration : 지연 : 옵션 : 애니메이션 : 완료 : UIViewAnimationOptionRepeat와 함께 사용하면 UI 차단

- (void)pulsePlayIcon { 
    if ([self isPlaying]) { 
     return; 
    } 

    [[self videoView] playIcon].hidden = NO; 
    [[self videoView] playIcon].alpha = 1.0; 

    [UIView animateWithDuration:[self playIconPulseDuration] 
          delay:[self playIconPulseTimeInterval] 
         options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse) 
        animations:^{ 
         [[self videoView] playIcon].alpha = 0.8; 
        } 
        completion:^(BOOL completed) {}]; 
} 

이 아이폰 OS 5.0에서 훌륭하게 작동하지만 4.3에서 차단 UI를. UI가 응답하지 않습니다. 나는 이것이 iOS 버전 4.0 이상 (> = 4.0)에서 반복 애니메이션을하는 제안 된 방법이라고 읽었습니다. 범인은 UIViewAnimationOptionRepeat 인 것 같습니다. 내가 만든 명백한 오류가 보이니?

+0

방금 ​​전에 똑같은 문제가 발생했습니다. 오늘까지 iOS 4.3에서 테스트하지 않았습니다. 어떤 이유로 iOS 5 이상에서는 UIViewAnimationOptionAllowUserInteraction이 true로 설정됩니다. – jowie

답변

11

아마도 UIViewAnimationOptionAllowUserInteraction을 포함해야합니다.

+0

완벽. 고맙습니다. – schellsan

관련 문제