I know there are a lot of Stack Overflow questions like this out there, but none of the answers I can find work for me. I am using a custom UITableViewCell
class called chillerCell
. Here is its code:
import UIKit
class chillerCell: UITableViewCell {
@IBOutlet weak var iconLabel: UILabel!
@IBOutlet weak var boldLabel: UILabel!
@IBOutlet weak var italicLabel: UILabel!
func configureCellWithEvent(event: Event){
boldLabel.text = "\(event.eventName)"
italicLabel.text = "\(event.eventDescription)"
}
}
I get the Thread 1 runtime error on the line boldLabel.text = "\(event.eventName)"
I made my own Event
class, and yes, event.eventName
and event.eventDescription
are of type String
and are not Nil
.
Edit: I forgot to mention, my boldLabel and italicLabel are not plain text, but attributed text.