@IBInspectable with enum?

前端 未结 7 1379
旧时难觅i
旧时难觅i 2020-12-24 04:11

I\'d like to create @IBInspectable element as you see at the picture below :

\"enter

7条回答
  •  遥遥无期
    2020-12-24 04:47

    That's not possible (for now). You can only use those types that you see in User Defined Runtime Attributes section.

    From Apple's doc:

    You can attach the IBInspectable attribute to any property in a class declaration, class extension, or category for any type that’s supported by the Interface Builder defined runtime attributes: boolean, integer or floating point number, string, localized string, rectangle, point, size, color, range, and nil.

提交回复
热议问题