I am getting this warning message. How can I fix this.
Warning: IB Designables: Ignoring user defined runtime attribute for key path radius
on instance of UIButton
. Hit an exception when attempting to set its value: [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key radius
.
Here is custom UIButtonRounded class
@IBDesignable class UIButtonRounded: UIButton
{
override func layoutSubviews() {
super.layoutSubviews()
updateCornerRadius()
}
@IBInspectable var rounded: Bool = false {
didSet {
updateCornerRadius()
}
}
@IBInspectable var border: Bool = false {
didSet {
updateCornerRadius()
}
}
@IBInspectable var radious: CGFloat = 0 {
didSet {
updateCornerRadius()
}
}
func updateCornerRadius() {
layer.cornerRadius = rounded ? radious : 0
layer.masksToBounds = true
if(border){
layer.borderWidth = 1.3
layer.borderColor = UIColor(named:"color_bg_white")?.cgColor
}
}
}
Thanks In advance.