As I understand, in Objective-C you can only put Objects into dictionaries. So if I was to create a dictionary, it would have to have all objects. This means I need to put my ints in as NSNumber, right?
SOo...
NSNumber *testNum = [NSNumber numberWithInt:varMoney];
NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init];
[dictionary setObject:@"OMG, Object 1!!!!" forKey:@"1"];
[dictionary setObject:@"Number two!" forKey:@"2"];
[dictionary setObject:testNum forKey:@"3"];
NSNumber *retrieved = [dictionary objectForKey:@"3"];
int newVarMoney = [retrieved intValue];
Where varMoney is an int that has been declared earlier. My question is, is there a better way to store "int" in a dictionary than putting it into a NSNumber?
Thanks!