0

i know that this error occurs when there's an outlet connected (which is modified ) but i checked my class so many times even though i created a new class and removed all the outlets from my tableView's cell's previous class and again added those outlets to my new class still i'm keep getting this error. its been 3 hours.... still i have no clue what is wrong here , anyone knows whats wrong here ???

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.

for those who gonna say its duplicate.. , let me clear this i checked these questions already :

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

and after checking all these question i'm still clueless what is wrong on my case.

if anybody have any clue what is wrong here then please let me know

and the above error is occurring when i'm trying to change the image of my UIButton which is inside an TableViewCell

let currentCell =  self.tableView(self.tableView, cellForRowAtIndexPath: NSIndexPath(forItem: row, inSection: 0)) as! NewTagDetailTableViewCell
currentCell.upvoteButton.setImage(UIImage(named: "icon_voted"), forState: .Normal)
Community
  • 1
  • 1
remy boys
  • 2,928
  • 5
  • 36
  • 65
  • I suspect the key phrase is "user defined inspected property". Are you doing anything with `@IBInspectable` or with user defined attributes in IB? – Phillip Mills Sep 09 '16 at 14:04
  • isn't it weird that this error is only appearing when i'm trying to change image ? not when i'm triggering action from this button ?? @PhillipMills – remy boys Sep 09 '16 at 14:11
  • Not necessarily weird. It knows that the object is a `UIButton`; it just doesn't think it has an `image` property...for some unknown reason. If you try to change other properties on the button (title, titleColor, ...), does it object to that too or only to `image`? – Phillip Mills Sep 09 '16 at 14:15

0 Answers0