IBInspectable and protocols

I am using a new Xcode 6 feature called "LiveRendering". Since I need to reuse some checked properties for different user views, I want to declare them in the protocols.

For instance:

  • LiveRenderingTextAttributesProtocol (declares checked properties for textColor, textSize
  • LiveRenderingBorderAttributesProtocol (declares checked properties for borderStyle, borderColor, borderWidth)

etc.

After that, each user view implements the necessary protocols.

But I can’t see my properties being checked in the “Attributes inspector” column of the InterfaceBuilder Inspector: / LiveRendering works well when I define the values ​​of these properties as “Runtime attributes used Runtime”, but I want to see them in my Attributes inspector column.

An idea to solve this problem, please?

+4
source share
1 answer

, , , . reqable base IBInspectable, , MyInspectableView, , , IBInspectables .

+1

All Articles