Wu River bank, why not xiang King, he a stirring.
Recently in calendar multiple-choice written, for the time period specified date multiple conditions in array, into a string into the backend, considering the time date about order to generate plan, regardless of the user on the same date or dates of multiple fingers and cancel or selected to ensure that the final array time date is positive sequence alignment
NSMutableArray *DateArr = [NSMutableArray new]; NSSortDescriptor *YXdescriptor = [[NSSortDescriptor alloc] initWithKey:@"self" ascending:NO]; NSArray *descriptors = [NSArray arrayWithObject: YXdescriptor]; NSArray *reverseOrder = [DateArr sortedArrayUsingDescriptors: YXdescriptor]; NSMutableArray * timeArray = [NSMutableArray new]; NSMutableArray * timeArray = [NSMutableArray new] [timearray addObjectsFromArray:reverseOrder]; [timearray addObjectsFromArray:reverseOrder]; Timearray = (NSMutableArray *)[[timearray reverseObjectEnumerator] allObjects];Copy the code