How can I call convenience initializer from superclass? When I try to call it in "old" and "logical" way it thorws error: "Must call a designated initializer of the superclass <SuperClassName>"
Here's some code:
Framework class
class UIAlertView : UIView {
convenience init(title: String?, message: String?, delegate: AnyObject?, cancelButtonTitle: String?) /<UIAlertViewDelegate>*/
init(frame: CGRect)
init(coder aDecoder: NSCoder)
}
My class (edit: I've forgotten other initializers)
class ConfirmationAlert: UIAlertView, UIAlertViewDelegate {
init(title: String?, message: String?, cancelButtonTitle: String? = "common_cancel") {
super.init(title: title, message: message, delegate: nil, cancelButtonTitle: cancelButtonTitle) //error here
delegate = self
}
override init(frame: CGRect) {
super.init(frame: frame)
}
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
}
The point is: when calling convenience initializer from superclass, it still has to call own designated constructor. So what's the point in disallowing it?
How can I bypass this and call the initializer I wanted to call in the first place?
edit:
I don't know which designated initializer to call, moreover with what parameters? I just want to call a super convenience initializer because it knows which super designated initializer to call.