uiview corner radius color in swift 4 code example Example: add corner radius to uiview swift view.layer.cornerRadius = 25 view.layer.masksToBounds = true