abbaspour-narjes
10/10/2017 - 8:04 AM

Radius

Radius

@IBDesignable class  customButton : UIButton{
    
    @IBInspectable var radius:Bool = false{
    
        didSet{
            
        clipsToBounds = true;
            
        let w = frame.size.width / 19.25
        layer.cornerRadius=frame.size.width/w
        }
    
    }

}