I'm getting this warning in Xcode when I try to send an object which is a subclass of the expected class.
[reminder addContactsObject:individual];
addContactsObject method is expecting that the input should be of type Contact
. The individual
that I'm sending is a subclass of Contact
(Individual : Contact
).
So why is this generating a warning?
Edit: Added code...
Reminder.h
@interface Reminder : NSManagedObject
- (void)addContactsObject:(Contact *)value;
Contact.h
@interface Contact : NSManagedObject
Individual.h
@interface Individual : Contact
Probably need to include the Individual header. If you don't the compiler won't know the superclass
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With