Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sandhya.rai

macrumors newbie
Original poster
Jan 12, 2009
26
0
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

macrumors 68020
Aug 23, 2008
2,005
3
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.

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

Which part do you not understand?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
If you want to add values to a dictionary later than creation time then you need to use an NSMutableDictionary: NSDictionary is immutable.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.