I have a dictionary "playerDict" that reads data from plist, where there are names (myKey) with nine objects associated with each key.
I am trying to read all objects for a specific key (myKeys) in NSMutableArray (theObjects). I read the link to the class and search on the Internet, but I can not understand our this, possibly very simple problem.
Among all the other tests that I did, I tried the following, but it returns the key in objects, not objects.
theObjects = [playerDict objectForKey: myKeys];
Anyone who can give a hint?
Here is the code that dict created, I split it:
NSArray *objs = [NSArray arrayWithObjects:[NSNumber numberWithBool:playerObject.diffHard],[NSNumber numberWithBool:playerObject.diffMedium],
[NSNumber numberWithBool:playerObject.diffEasy],[NSNumber numberWithBool:playerObject.currentGame],
[NSNumber numberWithInt:playerObject.currentGameQuestion],[NSNumber numberWithInt:playerObject.currentGameRightAnswer],
[NSNumber numberWithInt:playerObject.currentGameType],[NSNumber numberWithInt:playerObject.nrOfType0Games],
[NSNumber numberWithInt:playerObject.type0Result], nil];
NSDictionary *newPlayerDict = [NSDictionary dictionaryWithObjectsAndKeys:objs, keyString, nil];
source
share