【问题标题】:Swift How to fix Failed to set user defined inspected property on PleaseSwift如何修复无法设置用户定义的检查属性请
【发布时间】:2015-10-08 17:36:57
【问题描述】:

我的故事板有问题。我安装了这个:https://github.com/okmr-d/DOFavoriteButton 并将所有效果正确地放在一个 Button 中,但现在故事板在控制台中有很多错误,这使得应用程序非常慢。我该如何解决?谢谢!

错误

> 2015-10-08 19:33:01.629 AppName [45857:6557884] Failed to set (imageColorOn) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8a23a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOn.
2015-10-08 19:33:01.630 AppName[45857:6557884] Failed to set (imageColorOff) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8a23a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOff.
2015-10-08 19:33:01.630 AppName[45857:6557884] Failed to set (duration) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8a23a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key duration.
2015-10-08 19:33:01.938 AppName[45857:6557884] Failed to set (imageColorOn) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8afbb0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOn.
2015-10-08 19:33:01.938 AppName[45857:6557884] Failed to set (imageColorOff) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8afbb0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOff.
2015-10-08 19:33:01.938 AppName[45857:6557884] Failed to set (duration) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8afbb0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key duration.
2015-10-08 19:33:02.104 AppName[45857:6557884] Failed to set (imageColorOn) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8c3a40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOn.
2015-10-08 19:33:02.104 AppName[45857:6557884] Failed to set (imageColorOff) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8c3a40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOff.
2015-10-08 19:33:02.104 AppName[45857:6557884] Failed to set (duration) user defined inspected property on (UIButton): [<UIButton 0x7fbcec8c3a40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key duration.
2015-10-08 19:33:02.257 AppName[45857:6557884] Failed to set (imageColorOn) user defined inspected property on (UIButton): [<UIButton 0x7fbceacae5c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOn.
2015-10-08 19:33:02.257 AppName[45857:6557884] Failed to set (imageColorOff) user defined inspected property on (UIButton): [<UIButton 0x7fbceacae5c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOff.
2015-10-08 19:33:02.257 AppName[45857:6557884] Failed to set (duration) user defined inspected property on (UIButton): [<UIButton 0x7fbceacae5c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key duration.
2015-10-08 19:33:02.553 AppName[45857:6557884] Failed to set (imageColorOn) user defined inspected property on (UIButton): [<UIButton 0x7fbceadd34a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOn.
2015-10-08 19:33:02.553 AppName[45857:6557884] Failed to set (imageColorOff) user defined inspected property on (UIButton): [<UIButton 0x7fbceadd34a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key imageColorOff.
2015-10-08 19:33:02.553 AppName[45857:6557884] Failed to set (duration) user defined inspected property on (UIButton): [<UIButton 0x7fbceadd34a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key duration.

【问题讨论】:

    标签: ios swift storyboard


    【解决方案1】:

    在我的情况下,模块没有在类下面分配。所以,我有分配模块,一切都很完美。

    没有模块分配(错误原因):-

    使用模块分配。 (已解决的问题):-

    【讨论】:

      【解决方案2】:

      由于选择的答案并不完全详细,因此我将把它留在这里给有类似问题的任何人。

      我遇到了类似的问题,即“无法在 (UITextField) 上设置 (selectedLineColor) 用户定义的检查属性:[ setValue:forUndefinedKey:]: 这个类不是键值编码兼容键选定的线颜色。"

      问题在于我的一个 UITextFields 我最初将其类设置为 SkyFloatingLabelTextField,并在属性检查器中设置了一些自定义设置。当我删除该类时,文本字段仍然保留了导致错误的自定义设置。

      这些设置是在身份检查器中的“用户定义的运行时属性”下设置的。

      我删除了盒子里的钥匙,错误就消失了。

      【讨论】:

        【解决方案3】:

        我看到另一个按钮(类 UIButton )与 DOFavorite 类按钮的键值相同。我删除了它们,现在可以使用了!

        【讨论】:

        • 请修正拼写/等,并添加更多关于原因和修正的信息,以便答案对遇到相同问题的其他人更有帮助。
        猜你喜欢
        • 2020-12-11
        • 2020-11-02
        • 1970-01-01
        • 2020-07-19
        • 1970-01-01
        • 1970-01-01
        • 2021-02-04
        • 2019-12-13
        • 2018-06-28
        相关资源
        最近更新 更多