我已经在tableViewCell中创建了一个UIView,并从各个方面设置了UIView约束5,但是当我尝试更改其背景颜色或使其框架面向崩溃时
线程1:致命错误:在隐式展开一个可选值时意外发现nil
class MyCell: UITableViewCell{
@IBOutlet weak var viewCell: UIView!
override func awakeFromNib() {
super.awakeFromNib()
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func designCell(data:[String:Any]){
self.viewCell.backgroundColor = UIColor.yellow //getting crash
}
}
我已经在tableViewCell中创建了一个UIView并从各个侧面设置了UIView约束5,但是当我尝试更改其背景颜色或使其框架面对崩溃时,线程1:致命错误:出乎意料的...
viewCell
插座。打开情节提要,并确保插座已连接到所需的viewCell
。