Created
January 3, 2017 06:32
-
-
Save calda/5b4fc9cb242de46e54cea3edbd5359dc to your computer and use it in GitHub Desktop.
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 CornerRadiusView : UIView { | |
@IBInspectable var cornerRadius: CGFloat = -1 | |
override func draw(_ rect: CGRect) { | |
self.layer.cornerRadius = cornerRadius | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment