Youssef Moawad
Youssef Moawad

Reputation: 2866

Deleted IBInspectable property generates warning logs

I was using a couple of @IBInspectable properties on my class after which I changed my mind and deleted them. Although, it seems IB is still trying to set them and each run generates warnings like:

2015-03-04 11:47:10.288 2D[29075:939900] Failed to set (shapeAsInt) user defined inspected property on (_D.ShapeButton): [<_D.ShapeButton 0x12fe25340> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key shapeAsInt.
2015-03-04 11:47:10.289 2D[29075:939900] Failed to set (colorAsInt) user defined inspected property on (_D.ColorButton): [<_D.ColorButton 0x12fd21800> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key colorAsInt.

Although the logs do not cause the app to crash, they are pretty annoying.

Has anyone else encountered this? How did you get it fixed?

Upvotes: 0

Views: 198

Answers (3)

incelemeTRe
incelemeTRe

Reputation: 65

My solution was deleting the button's class name from identity inspector, then deleting the custom class itself and rewriting class with a different name,then adding new class name in the identity inspector again.

Upvotes: -1

Sujata
Sujata

Reputation: 21

In Xcode, within the Identity Inspector, remove the properties from User Defined Runtime Attributes using the - symbol

screenshot

Upvotes: 2

ukaszm
ukaszm

Reputation: 1

Well, you can delete it manually - it's quite easy. Open storyboard that causes problem with external editor (right click on storyboard and choose from context menu "open with external editor"), find line with deleted property and delete that line. Done

Upvotes: 0

Related Questions