I have a class A defined in ObjC and Class B - subclass of A defined in Swift. The implementation is as follows:
Class A
- (id)init {
return [super init];
}
Class B
init(url: NSURL) {
super.init()
let request = NSMutableURLRequest(URL: url)
request.setValue(valueID, forHTTPHeaderField: "value_ID")
urlRequest = request
}
convenience init(recoveryURL: NSURL) {
self.init(url: recoveryURL)
}
required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
Class B is initialized as follows (since its loaded from the xib file):
ClassB *b = [[ClassB alloc] initWithNibName:@"ClassA" bundle:nil];
The error is seen on super.init()
line inside init(url: NSURL)
of class B. I'm trying to use convenience initializers. I would appreciate if someone can point me @ where am I going wrong?