#import <Foundation/Foundation.h>
@interface NSMutableArray (Convert)
- (NSMutableArray *)convertArr:(NSMutableArray *)arr;
@end
#import "NSMutableArray+Convert.h"
@implementation NSMutableArray (Convert)
NSMutableArray *arr1 = [[NSMutableArray alloc] initWithCapacity:1];
for (NSInteger i = [arr count] - 1; i >= 0; i--) {
[arr1 addObject:arr[i]];
}
return arr1;
}
@end
时间: 2024-10-14 05:31:28