Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. layer.cornerRadius Number 10
  2. layer.masksToBounds Boolean true
  3.  
  4. let circle = UIImage(named: "circle")
  5. button.setBackgroundImage(circle, for: UIControlState.normal)
  6.  
  7. @IBInspectable var cornerRadius: CGFloat = 0{
  8. didSet{
  9. self.layer.cornerRadius = cornerRadius
  10. }
  11. }
  12.  
  13. @IBInspectable var borderWidth: CGFloat = 0{
  14. didSet{
  15. self.layer.borderWidth = borderWidth
  16. }
  17. }
  18.  
  19. @IBInspectable var borderColor: UIColor = UIColor.clear{
  20. didSet{
  21. self.layer.borderColor = borderColor.cgColor
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement