How do you perform selectors with an argument? This is my code:
SEL methods=NSSelectorFromString([arrayWithMethods objectAtIndex:i]);
[self performSelector:methods withObject:self afterDelay:MAN_SPEED*i];
If my selector method has an argument, how do I specify it?
The string for a selector with zero arguments looks like this:
If it has one parameter, specify that by adding a colon after the method name:
Now your myMethod will get passed ‘self’ (since that’s what you’re passing as the ‘with object”.