I have an IBDesignable subclass of UIButton, but my changes don't appear on the storyboard where I use it. I have tried refreshing all views on my storyboard, or re-linking the button with the class, but to no avail.
The class:
@IBDesignable class MyButton: UIButton {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
func commonInit() {
layer.cornerRadius = 3
layer.masksToBounds = true
backgroundColor = Colors.E9511C
setTitleColor(.white, for: .normal)
titleLabel?.font = Fonts.openSansBold(14)
}
}