I have an array that contains values like 0,3,2,8 etc.I want to sort my array in increasing order.Please tell me how to do this.
Thanks in advance!!
NSSortDescriptor *sortDescriptor; sortDescriptor = [[[NSSortDescriptor alloc] initWithKey:nil ascending:YES] autorelease]; NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor]; NSArray *sortedArray; sortedArray = [**YourArray** sortedArrayUsingDescriptors:sortDescriptors];