objective c - enumerateKeysAndObjectsUsingBlock - order of entries in dictionary? -
does know if order of enumeration using enumeratekeysandobjectsusingblock on nsdictionary defined? experiments suggest it's same order stuff added, can't 100% & don't want break... can't find anywhere tells me.
the order not defined @ all. how set acts , dictionary quite close sec...
to sure order kept have use sortable property , when keys, sort resulting array
or use ordereddictionary .... there implementation of floating around on google nsdictionary + nsarray keys being in stable order
a 1 cocoa heads
https://github.com/davedelong/chdatastructures/blob/master/source/chordereddictionary.h https://github.com/davedelong/chdatastructures/blob/master/source/chordereddictionary.m
Comments
Post a Comment