Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to document an @IBInspectable property in Xcode

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

like image 670
Evgenii Avatar asked Jun 18 '15 23:06

Evgenii


1 Answers

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.

like image 70
Julian Avatar answered Nov 19 '22 12:11

Julian