Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- layer.cornerRadius Number 10
- layer.masksToBounds Boolean true
- let circle = UIImage(named: "circle")
- button.setBackgroundImage(circle, for: UIControlState.normal)
- @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
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement