NSDictionary *dic = @{@"devicetype":@"1",
@"hospital_id":@"2",
@"phone":@"3",
@"user_id":@"4",
@"hsnm":@"2",
@"njh":@"1",
@"hanm":@"2",
@"hbnm":@"2",
@"hcnm":@"2",
@"hdnm":@"2",
@"hmnm":@"2"};
NSArray *keyArray = dic.allKeys;
NSArray *sortArray = [keyArray sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
return [obj1 compare:obj2 options:NSNumericSearch];
}];
网友评论