Created
February 22, 2018 18:02
-
-
Save mansi-27/2d1e2891740fe5f10e16c3c4f5a8356a to your computer and use it in GitHub Desktop.
Sets border to the UIView
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
| extension UIView { | |
| /// Sets border to the UIView | |
| func setViewBorder(withWidth width: CGFloat = 1.0, color: UIColor) { | |
| self.layer.borderWidth = width | |
| self.layer.borderColor = color.cgColor | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment