数组的属性排序

 

 

 

 

 //按照下单日期排序

                if (self.orderListArrM.count > 0) {

                    //createDate是数字mode中的属性

                    NSSortDescriptor* createDateDesc = [NSSortDescriptor sortDescriptorWithKey:@"createDate" ascending:NO];

                    //重新

                    self.orderListArrM = [[NSMutableArray alloc] initWithArray:[self.orderListArrM sortedArrayUsingDescriptors:@[createDateDesc]]];

                }

 

posted @ 2015-03-18 12:02  花园晓雨  阅读(139)  评论(0编辑  收藏  举报