0
我想通過其被存儲在對象:)NSSortDescriptor以與陣列中的對象
爲了更好地概覽我已經包括陣列一個陣列內的值進行排序一個NSMutableArray。我想按時間排序(starttijd)
隨着NSSortDescriptor我設法按狀態的url排序,但不是按時間排序。
這是我整理當前的代碼:
NSSortDescriptor * sortDescriptor;sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@「starttuhd」 遞增:YES]; NSArray * sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
sortedarray = [alleitems sortedArrayUsingDescriptors:sortDescriptors]; NSLog(@"Sorted array: %@", sortedarray);
如果一個對象在具有不同'starttijd'日期的'custom_fields'內有多個對象,該怎麼辦?應該選擇什麼來進行排序? – bhargavg 2014-09-12 10:37:44
什麼是您的實際代碼排序? – Larme 2014-09-12 10:43:51
總是隻有1個starttijd – 2014-09-12 10:44:27