根据对象里时间排序
@"bg_updateTime"为时间字段,array为对象数组
//降序NO 升序YES
NSMutableArray *muarray = [NSMutableArray arrayWithArray:array];
NSSortDescriptor *sort = [NSSortDescriptor sortDescriptorWithKey:@"bg_updateTime" ascending:NO];
[muarray sortUsingDescriptors:[NSArray arrayWithObject:sort]];
NSLog(@"%@", muarray);
网友评论