Skip to content

Instantly share code, notes, and snippets.

@mansi-27
Created February 22, 2018 18:02
Show Gist options
  • Select an option

  • Save mansi-27/2d1e2891740fe5f10e16c3c4f5a8356a to your computer and use it in GitHub Desktop.

Select an option

Save mansi-27/2d1e2891740fe5f10e16c3c4f5a8356a to your computer and use it in GitHub Desktop.
Sets border to the UIView
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