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; }
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
Post a Comment