How to document an @IBInspectable property in Xcode

505 views Asked by At

In my custom UIView I have a property that I expose to the storyboard with @IBInspectable.

/**

My custom property documentation.

*/
@IBInspectable var myProperty: Double = 2.5

Is there a way to show a documentation when a user hovers the cursor over the field in the attribute inspector? It does work for built in elements and I would like to do the same for my property.

enter image description here

1

There are 1 answers

0
Julian On

Unfortunately it looks like you can not prepare a text to be presented by such a tool tip. At least for now.

I even noticed that if you do not explicitly put a type (but assign default value instead) for that designable, the filed is not generated in attribute inspector.