use this code:
NSArray *sortedArray = [unsortedArray sortedArrayUsingComparator:^(id firstObject, id secondObject) {
return [((NSString *)firstObject) compare:((NSString *)secondObject) options:NSNumericSearch];
}];
EDIT: If the elements are numbers, change the returned type and the type of the firstObject and secondObject.