I have init()
method on objc class.
A swift class subclasses the objc class and tries to call super.init()
it's an error because init()
is not an designated initializer for MyObjcViewcontroller.
@interface MyObjcViewController: UIViewController {
}
- (id) init;
@end
@implementation MyObjcViewController
- (id) init {
self = [super init];
if (self) {
}
return self;
}
@end
@objc class MySwiftViewController: MyObjcViewController {
override init() {
super.init() // error
}
}