How to document the @IBInspectable property in Xcode

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

 /** My custom property documentation. */ @IBInspectable var myProperty: Double = 2.5 

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

enter image description here

+6
source share
1 answer

Unfortunately, it seems that you cannot prepare the text for such a hint. At least for now.

I even noticed that if you do not explicitly set the type (but instead assign the default value) for this assigned file, it is not generated in the attribute inspector.

+1
source

Source: https://habr.com/ru/post/989370/


All Articles