i try to change the labelcolor, if the "date" in my detailTextLabel.text older then today..
// Configure the cell...
cell.textLabel?.textColor = UIColor.blueColor()
cell.detailTextLabel?.textColor = UIColor.darkGrayColor()
let item = frc.objectAtIndexPath(indexPath) as! Item
cell.textLabel?.text = item.name! + "-" + item.etage! + "-" + item.raum!
let note = item.date
cell.detailTextLabel!.text = "\(note!)"
if note == "01.04.2016 23:00" {
cell.detailTextLabel?.textColor = UIColor.redColor()
} else {
}
return cell
}
How can i do this? It works with a specific date but not with NSDate() or something like this. I go crazy!
big thx!