冒泡排序(从小到大)
//大字典存放所有数据(33个小字典他们的key是1-33数字)
self.dataDic = dic;
NSMutableArray *array = [[NSMutableArray alloc]initWithArray:[dic allKeys]];
for (int i = 0; i < array.count; i ++)
{
for ( int j = 0; j < array.count - i -1; j ++)
{
if([array[j] intValue] > [array[j+1] intValue])
{
int temp = [array[j] intValue];
array[j] = array[j+1];
array[j+1] = [NSString stringWithFormat:@"%d",temp];
}
}
}