我正在尝试使用该makeObjectsPerformSelector
方法。
这是我的代码。我不明白为什么当我makeObjectsPerformSelector
用选择器调用时uppercase:
它找不到它......
#import "testAppViewController.h"
@interface testAppViewController ()
- (void)uppercase;
@property (nonatomic, strong) NSMutableArray *arrayTest;
@end
@implementation testAppViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self start];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)uppercase
{
NSLog(@"---");
}
- (void) start
{
self.arrayTest = [[NSMutableArray alloc] init];
[self.arrayTest addObject:@"toto"];
[self.arrayTest addObject:@"tata"];
[self.arrayTest addObject:@"titi"];
[self.arrayTest addObject:@"tutu"];
for (NSString *s in self.arrayTest)
NSLog(@"1 - %@", s);
[self.arrayTest makeObjectsPerformSelector:@selector(uppercase)];
for (NSString *s in self.arrayTest)
NSLog(@"2 - %@", s);
}