Swift IBInspectable and IBDesignable
What is IBInspectable and IBDesignable in swift?
With IBInspectable and IBDesignable, it’s possible to build a custom interface.
@IBInspectable properties provide new access to your own attributes
to be configured on the Interface Builder.
@IBInspectable properties are runtime property.
So you can’t see how it changed without building and running your app
Otherwise @IBDesignable is user defined run time property.
If any @IBDesignable view is rendered on the storyboard,
the value of the @IBInspectable property rendered too.
This allows you to check @IBInspectable without building and running your app!
Add @IBInspectable properties to UIView
Tada! You can see that properties in storyboard!
Make own @IBDesignable view.
With this custom view, you can check how @IBInspectable property change view!