0

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?

Youssef Moawad
  • 2,846
  • 5
  • 28
  • 50

3 Answers3

2

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

screenshot

shim
  • 9,289
  • 12
  • 69
  • 108
Sujata
  • 21
  • 2
0

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

ukaszm
  • 1
-1

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.

incelemeTRe
  • 43
  • 1
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 16 '22 at 08:11