I have been using @selector today for the first time and have not been able to work out how to do the following? How would you write the @selector if you had more than one argument?
NO ARGUMENTS:
-(void)printText {
NSLog(@"Fish");
}
[self performSelector:@selector(printText) withObject:nil afterDelay:0.25];
SINGLE ARGUMENT:
-(void)printText:(NSString *)myText {
NSLog(@"Text = %@", myText);
}
[self performSelector:@selector(printText:) withObject:@"Cake" afterDelay:0.25];
DOUBLE ARGUMENTS:
-(void)printText:(NSString *)myText andMore:(NSString *)extraText {
NSLog(@"Text = %@ and %@", myText, extraText);
}
[self performSelector:@selector(printText:andMore:) withObject:@"Cake" withObject:@"Chips"];
MULTIPLE ARGUMENTS: (i.e. >2)
gary