Corner radius not showing on button in storyboard with @IBDesigable/@IBInspectable
问题 I have this custom class for a button. import UIKit @IBDesignable class CustomButton: UIButton { @IBInspectable var cornerRadiusValue: CGFloat = 10.0 { didSet { setUpView() } } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.layer.cornerRadius = 10.0 } override func awakeFromNib() { setUpView() } override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() setUpView() } func setUpView() { self.layer.cornerRadius = 10.0 } } But the corner radius is