有没有办法通过 NSTimer 向选择器发送参数?
myTimer =[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(removeTheNote:) userInfo:nil repeats:NO];
- (void)removeTheNote:(NSString*)note
{
NSLog(@"Note %@ ----------- REMOVED!",note);
}
我知道使用:
myTimer =[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(removeTheNote:myNote) userInfo:nil repeats:NO];
不起作用,所以我问,有没有办法做到这一点?