I’m new to iPhone and i know about the primitive data structure in C like array and all but in objective c there is dictionary,i know that it is having a key value pair structure we can access values from equivalent keys and mutable dictionary is dynamic and all.I mean the basic structure i am aware about, but when we have to prefer dictionary?,what are the possible manipulation we can do in dictionary,how optimized it is?.
Any help appreciated in advance.
I’m new to iPhone and i know about the primitive data structure in C
Share
An
NSDictionaryis known more generally as an Associative Array.See the following Wikipedia article for a full explanation
http://en.wikipedia.org/wiki/Associative_array
You would use a dictionary rather than an array where you need to refer to an object by (for example) a name, rather than its position (index) in a list.