objective c - Incomplete and randomly loading NSDictionary all keys into NSArray -


when loading key's value of nsdictionary nsarray class. incompletely , jumbling (randomly) loading key value of dictionary nsarray class

- (id)initwithcoder:(nscoder *)coder {     self = [super initwithcoder:coder];     if (self) {             //do sth         colornamelist = [[colormodelclass colorlistnames]allkeys];     }     return self; } 

enter image description here

issue is: expect key load dictionary array in sequentially not randomly out missing key's

i think if need sort dictionary , store in array, may worked,

try sort dictionary doing bellow code:

keyarray = [dicwebcolors allkeys]; keyarray = [keyarray sortedarrayusingselector:@selector(localizedstandardcompare:)]; 

then proceed store data array.

thanks


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -