Section用にUIViewを作成し、Row用に1回作成します。次に、メソッドを作成します。
-(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 ??
イベントをキャッチする場合は、セクションと行に点滅する背景色の効果を作成する必要があります。