无法解决类不符合关键值编码

时间:2016-09-09 13:51:54

标签: ios uibutton swift2 iboutlet

我知道当连接插座(已修改)时会发生此错误但我已经多次检查我的课程,即使我创建了一个新课程并从我的tableView单元格的上一课程中删除了所有插座并再次添加了这些插座到我的新班仍然我一直得到这个错误。已经3个小时......我仍然不知道这里有什么问题,谁知道这里有什么问题?

Failed to set (image) user defined inspected property on (UIButton): [<UIButton 0x148a8ecf0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key image.

对于那些会说它重复的人......,让我清楚一点,我已经检查了这些问题:

Class is not key value coding compliant

This class is not key value coding-compliant with @IBInspectable

What does this mean? "'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X"

setValue:forUndefinedKey: this class is not key value coding-compliant for the key

在检查了所有这些问题后,我仍然无能为力。我的案例有什么不妥。

如果有人知道这里有什么问题,请告诉我

当我正在尝试更改我的UIButton(在TableViewCell中)的图像时发生上述错误

let currentCell =  self.tableView(self.tableView, cellForRowAtIndexPath: NSIndexPath(forItem: row, inSection: 0)) as! NewTagDetailTableViewCell
currentCell.upvoteButton.setImage(UIImage(named: "icon_voted"), forState: .Normal)

0 个答案:

没有答案
相关问题