I want to subclass a UIButton in Swift. I get an error when setting buttonType
class MyButton: UIButton {
init(label: KeyLabelType) {
super.init(frame: CGRectZero)
self.buttonType = UIButtonType.Custom
}
}
Any suggestions on why this is incorrect?