Created
March 13, 2019 17:49
-
-
Save KanshuYokoo/e4df88888d4ba7513778f588942e4fd9 to your computer and use it in GitHub Desktop.
ios custom BorderView
This file contains hidden or 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
import UIKit | |
@IBDesignable class CustomBorderView: UIView { | |
@IBInspectable var cornerRadius: CGFloat = 0{ | |
didSet{ | |
self.layer.cornerRadius = cornerRadius | |
} | |
} | |
@IBInspectable var borderWidth: CGFloat = 0 { | |
didSet{ | |
self.layer.borderWidth = borderWidth | |
} | |
} | |
@IBInspectable var borderColor: UIColor = UIColor.clear{ | |
didSet{ | |
self.layer.borderColor = borderColor.cgColor | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment