Let’s say you want to configure some parts of your view rendering directly in your storyboards. Fortunately you can by using @IBInspectable.
Syntax
1 2 |
@IBInspectable var radius: CGFloat = 0 @IBInspectable var strokeColor: UIColor = UIColor.black() |
Result in Xcode
Simulator
Here is the project ( Xcode 8, Swift 3) if you want to try it : IBInspectableDemo
That’s it folks, have a good day !
MAB