reference : https://www.advancedswift.com/corners-borders-shadows/#corner-radius Corner Radius, Shadows, and Borders in Swift Learn how to apply a corner radius, shadow, and border to all kinds of views, including UIViews, UIButtons, and UIImageViews, in Swift. www.advancedswift.com