2012-01-24 4 views
9

UIViewAnimationOptionAutoreverse私は、再生アイコンをパルスする機能を実行している:animateWithDuration:delay:options:animations:completion: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) {}]; 
} 

これはiOSの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

関連する問題