close

NSMutableArray Sory

===============================================================

    self.Dict_MutablemsgDlist = [self.Dict_msgDatamutableCopy];

    NSMutableArray *keyArray = [[NSMutableArray alloc] init];

    [keyArray addObjectsFromArray:[[self.Dict_MutablemsgDlist allKeys]

                                   sortedArrayUsingSelector:@selector(compare:)]];//NSMutableArray ASC

    NSSortDescriptor* sortOrder = [NSSortDescriptor sortDescriptorWithKey:@"self" ascending:NO];

    //加這這行後變DESC

   [keyArray sortUsingDescriptors: [NSArray arrayWithObject:sortOrder]];//NSMutableArray DESC

 

    self.Ary_Drows = keyArray;

    [keyArray release];

 

NSArray DESC

==================================================================

        NSSortDescriptor* sortOrder = [NSSortDescriptorsortDescriptorWithKey: @"self"ascending: NO];

        NSArray *Ary_photo = [[self.Dict_photoallKeys] sortedArrayUsingDescriptors: [NSArrayarrayWithObject: sortOrder]];

 

arrow
arrow
    全站熱搜

    result945 發表在 痞客邦 留言(0) 人氣()