After @implementation and before viewDidLoad I declare my NSMutableDictionary as follows :
NSMutableDictionary *dictionary;
Then in my viewDidLoad method I try this :
[dictionary setObject:@"test" forKey:@"haha"];
NSLog(@"%@", [dictionary objectForKey:@"haha"]);
The NSLog returns a null value :
(null)
I would like to know why that happens, it should return "test", doesnt it ?