0

我在课堂上使用了几个@IBInspectable 属性,之后我改变了主意并删除了它们。虽然,IB 似乎仍在尝试设置它们,并且每次运行都会生成如下警告:

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.

虽然日志不会导致应用程序崩溃,但它们非常烦人。

有人遇到过这种情况么?你是怎么修好的?

4

2 回答 2

2

在 Xcode 中,在Identity Inspector中,删除User Defined Runtime Attributes使用-符号的属性

截屏

于 2019-02-01T09:52:28.653 回答
0

好吧,您可以手动删除它 - 这很容易。打开导致外部编辑器出现问题的情节提要(右键单击情节提要并从上下文菜单中选择“使用外部编辑器打开”),找到具有已删除属性的行并删除该行。完毕

于 2015-08-27T11:27:11.557 回答