Swift 4: Extension for Inspectable Corner Radius, Border Color, and Shadow

Strongly recommended adding this to your project.

The easiest way dealing with corner radius, border and shadow right inside main storyboard!


1. Simply create a Swift file and paste the codes to it.


2. Assign the class of the DesignableView, DesignableButton or DesignableLabel. Then you can control corner radius, border width & color, and even shadow inside the storyboard.

P.S. It sometimes doesn’t show on the storyboard as soon as you made the changes. However, it’s still handy and simple!