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