根据ENumerator 进行数组排序输出(枚举)
#import <Foundation/Foundation.h> int main(int argc, const char * argv[]) { @autoreleasepool { NSMutableArray *array = [NSMutableArray arrayWithObjects:@"3",@"2",@"5",nil]; NSArray* reversedArray = [[array reverseObjectEnumerator] allObjects]; for (id str in reversedArray) { NSLog(@"%@",str); } } return 0; }