Created
May 9, 2020 15:34
-
-
Save stevencurtis/a859156444daddb6e7af320c0ff6ec36 to your computer and use it in GitHub Desktop.
updatedUpdateCornersView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBDesignable class UpdateCornersView: UIView { | |
@IBInspectable var cornerRadius: CGFloat = 0 { | |
didSet { | |
layer.cornerRadius = cornerRadius | |
layer.masksToBounds = cornerRadius > 1 | |
} | |
} | |
@IBInspectable var borderWidth: CGFloat = 0 { | |
didSet { | |
layer.borderWidth = borderWidth | |
} | |
} | |
@IBInspectable var borderColor: UIColor? { | |
didSet { | |
layer.borderColor = borderColor?.cgColor | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment