I am trying to subclass UIButton, but i want it to be of type .system. I am struggling with initializers
class FormButton: UIButton {
var type FormButtonType: FormButtomType.oneSelection
init(oftype formType: FormButtomType) {
self.type = formType
super.init(type: .system)
}
}
problem is that I have the following error message : "Must call a designated initializer of the superclass 'UIButton'