ios - Can you add IBDesignable properties to UIView using categories/extensions? -


for don't know i'm talking about, xcode 6.0 added new features, ibdesignable , ibinspectable.

when tag custom views ibinspectable properties, properties show in attributes inspector in ib.

likewise, when tag custom uiview subclass ibdesignable, xcode compiles views , invokes code render view objects right in xcode window can see like.

the technique adding ibdesignable , ibinspectable attributes custom views pretty identical in swift , objective-c. ibinspectable properties appear in interface builder attributes inspector regardless of language use define them.

i've created category of uiview in objective-c , extension of uiview in swift promote borderwidth, cornerradius, bordercolor, , layerbackgroundcolor properties of view's underlying layer properties of view. if change property, extension/category type conversion required , forwards change layer.

the ibinspectable part works great. see , can set new properties in ib attributes inspector.

i have sworn last week, ibdesignable attribute on view category/extension working too, , see custom uiview category rendering in ib it's changed layer attributes. week isn't working.

was hallucinating?

can categories/extensions of existing system classes draw custom ui in interface builder when set ibdesignable?

since posting question i've learned @ibdesignable not work class extensions. can add tag, has no effect.