I want to make an @IBInspectable for UIView that makes UIView as a circle:
@IBInspectable var circleBorder: Bool {
set {
layer.cornerRadius = layer.frame.size.width / 2
}
get {
return layer.cornerRadius > 0 ? true : false
}
}
The problem is that my @IBInspectable is called before constraints modifies its value and a wrong cornerRadius is being set. Is it possible to get the layer size after constraints here?