sch*_*san 9 core-animation ios4 ios ios5
我正在运行一个脉冲播放图标的功能:
- (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) {}];
}
Run Code Online (Sandbox Code Playgroud)
这在iOS 5.0中非常有效,但在4.3中它会阻止UI.用户界面没有响应.我读到这是在iOS 4.0或更高版本(> = 4.0)中重复动画的建议方法.罪魁祸首似乎是UIViewAnimationOptionRepeat.你看到我犯的任何明显错误吗?