Ich habe eine unendliche Animation in uiTableViewCell hinzugefügt, die nur ein UILabel in der Tabellenansicht Zelle blinkt.UIView.animateWithDuration stoppt nach dem Scrollen uitableviewcell
mein Problem ist, wenn ich die Tableview rollt sie hält nur das Blinken
meinen Code
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 ist:
UIView.commitAnimations() für mich gearbeitet. Vielen Dank an alle :)
Wo haben Sie die UIView.comititAnimations() deklariert? Hast du ein funktionierendes Beispiel? –