I've created custom cell and connected it as:
let cell: statisticsCell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! statisticsCell
and later I'm using it as:
cell.calendarLabel.text = recordsArray[indexPath.row].time
cell.dayLabel.text = "A \(recordsArray[indexPath.row].date)"
cell.amountLabel.text = "\(recordsArray[indexPath.row].count)"
but when I run my app, just this cell from those 3 - returns nil and crashes my app:
cell.dayLabel.text = "A \(recordsArray[indexPath.row].date)"
the value is not nil, I checked it.
Can anyone say me why it returns nil? Why just one label from 3 returns nil, while it's not nil?
Crash
It crashes with:
fatal error: unexpectedly found nil while unwrapping an Optional value
on the
cell.dayLabel.text