Я добавил бесконечную анимацию в uiTableViewCell, которая просто мигает UILabel внутри ячейки таблицы.UIView.animateWithDuration останавливается после прокрутки uitableviewcell
моя проблема, когда я прокручивает TableView он просто останавливается мигание
мой код
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("TripListCell", forIndexPath: indexPath) as! TripListCell
let trip = tripList[indexPath.section]
cell.lblTripDirection.textColor = UIColor(red: 51/255, green: 210/255, blue: 123/255, alpha: 1.0)
UIView.animateWithDuration(0.5, delay: 0.0, options: [.CurveEaseInOut, .Repeat, .Autoreverse, .AllowUserInteraction], animations: {
cell.lblTripDirection.alpha = 0.0
}, completion: {
bool in
cell.lblTripDirection.alpha = 1.0
cell.lblTripDirection.textColor = UIColor.blackColor()
})
return cell
}
Update:
UIView.commitAnimations() работал для меня. Спасибо всем :)
Где вы объявили UIView.commitAnimations()? У вас есть рабочий пример? –