I have a UITableViewCell that has a UILabel registered and connected through storyboard.
In the custom class for this UITableViewCell, I've added
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
//labelName.translatesAutoresizingMaskIntoConstraints = false
//labelName.addConstraint(widthConstraint)
}
I can't run any code in that init that references an IBOutlet of the cell like this labelName though, because it crashes with error "Unexpectedly found nil while unwrapping an Optional value". I can access that label in awakeFromNib() but I can't affect the label's constraints in awakeFromNib and I was steered towards init() as where to affect this change.
Thanks for any help you might have...