I have class Parent like this:
class Parent {
init? (data: AnyObject) { }
}
I have class Child like this:
class Child : Parent {
init? (info: AnyObject) { }
}
When I write code like this:
let obj = Child (data: someData);
I get error:
Incorrect argument label in call (have 'data:', expected 'info:')
But if I remove the constructor at child, the error disappears.
How can I have both of the constructors at child? Thanks.