Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extension UIButton {
- func setStyle(backgroundColor: UIColor, titleColor: UIColor, isBordered: Bool) {
- layer.cornerRadius = 5
- self.backgroundColor = backgroundColor
- self.setTitleColor(titleColor, for: .normal)
- if isBordered {
- layer.borderWidth = 1
- layer.borderColor = titleColor.cgColor
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement