handiansom handiansom -4 years ago 144
Objective-C Question

How to sort integer values of NSMutableArray [Objective C]?

I wanted to sort the integer values of my NSMutableArray. I don't know to to do it.

Any help please

Answer Source

NSMutableArray array = / loaded from file */;

array = [NSMutableArray arrayWithArray:[array sortedArrayUsingSelector: @selector(compare:)]]; [array sortedArrayUsingSelector: @selector(compare:)];

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download