Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import UIKit
  2.  
  3. @IBDesignable class CustomBorderView: UIView {
  4.  
  5. @IBInspectable var cornerRadius: CGFloat = 0{
  6. didSet{
  7. self.layer.cornerRadius = cornerRadius
  8. }
  9. }
  10.  
  11. @IBInspectable var borderWidth: CGFloat = 0 {
  12. didSet{
  13. self.layer.borderWidth = borderWidth
  14. }
  15. }
  16.  
  17. @IBInspectable var borderColor: UIColor = UIColor.clear{
  18. didSet{
  19. self.layer.borderColor = borderColor.cgColor
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement