example for the NSMutableDictionary in iphone development


Here is the code how to set the value in the NSMutableDictionary

NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setObject:@"007" forKey:@"Id"];
[dict setObject:@"Steve Job" forKey:@"name"];
[dict setObject:@"http://development-iphone-app.blogspot.com/" forKey:@"blog"];
 NSLog(@"%@", dict);
please follow the code to retrive the value from the NSMutableDictionary
NSString *Name = [dict valueForKey:@"name"];
you will get the vale for the Name is Steve Job
 

0 comments:

Post a Comment

Powered by Blogger.
Twitter Delicious Facebook Digg Stumbleupon Favorites More