Is it possible to narrow down a valid ivar type in a subclass. Something like that:
@interface person: NSObject { NSArray *friendArray; } @interface mutablePerson: person { NSMutableArray *friendArray; }
I just tried this exact code, and Xcode gave me a compilation error. I am wondering if there is a way around this.
The project I'm working on will have this situation. I understand that I can use casts to make the code work. But if I do this, I will make a lot of prizes, and I wonder if there is a better way.
source share