I am very new to Objective-C and I have come across the NSMutableDictionary. I want to insert an object into the key and from my understanding, you need to make a copy by using the NSCopying class.
I have been reading the Apple's Documentations and I am still puzzled with this. Also I have been searching for examples and I can only seem to find ones that have keys as NSString objects which seems to be automatically copied.
Here is the part of my implementation code:
@implementation League
- (void) setPlayerInTeam: (Club*) theClub playerObject: (Person*) person{
[playerTeam setObject:theClub forKey: person];
}
@end
the forKey:person is obviously wrong, how do I make a copy of this by using the NSCopying? Sorry for being a newbie but I am eager to learn.
Many thanks.