I'd like to set a value in the datailTextLabel of a UITableViewCell. If the code runs, the app crashes.
This is the error: fatal error: unexpectedly found nil while unwrapping an Optional value
This is the method in which the error takes place:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell = tableView.dequeueReusableCellWithIdentifier("Cell") as UITableViewCell
cell.detailTextLabel!.text = "Date" //error occurs
return cell
}
Possible useful informations: https://www.dropbox.com/s/240sy3k1ic2hu0q/Bildschirmfoto%202015-02-28%20um%2021.03.35.png?dl=0