How to work with NSDictionary in Objective C?
Working with NSDictionary in Objective C Basically, in Objective C NSDictionary is used to create and retrive the Key values for objectecs. It's very simple to create and retrive the key values using NSDictionary .. please see the given example of NSDictionary
// Creating NSDictionary NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys: @"userName", @"USER1", @"password", @"PASS1", nil]; //nil to signify end of objects and keys. // Access the dictionary value NSLog(@"%@", [dic [email protected]"password"); // Must Release NSDictionary [dic release];