我为 Section 创建 UIView,为 Row 创建一次。然后我创建方法:
-(void)startBlinking {
[UIView setAnimationsEnabled:YES];
[UIView animateWithDuration:5 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionCurveEaseInOut animations:^
{
[self setBackgroundColor:[UIColor yellowColor]];
} completion:^(BOOL finished)
{
[UIView animateWithDuration:5 delay:0.0 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionCurveEaseInOut animations:^
{
[self setBackgroundColor:[UIColor whiteColor]];
} completion: NULL];
}];
}
但是,如果我调用此方法,我将看不到任何动画。没有动画的背景颜色变化非常快...... :(( WTF ??
如果捕获事件,我需要为部分和行创建闪烁背景颜色效果。