PDA

View Full Version : Regarding NSDictionary use




sandhya.rai
Apr 15, 2009, 01:02 AM
HI

I am new to iphone programming , I want to know how to create a dictionary at runtime and how to insert the text values in created dictionary
I got stuk


thanx in advance
Sandhya



CocoaPuffs
Apr 15, 2009, 01:47 AM
Have you tried simply look at the documentation?

dictionaryWithObjectsAndKeys:
Creates and returns a dictionary containing entries constructed from the specified set of values and keys.

+ (id)dictionaryWithObjectsAndKeys:(id)firstObject , ...

Which part do you not understand?

robbieduncan
Apr 15, 2009, 02:01 AM
If you want to add values to a dictionary later than creation time then you need to use an NSMutableDictionary: NSDictionary is immutable.