recently i because quite disappointed when i learned that it's not possible to actually pass arguments with @selector() methods... i don't really know why that is, and it kinda pisses me off, but whatev...
so i'm trying to use NSInvocation to pass arguments thru a switch statement, but i need a little help. the following code isn't working:
any thoughts?
so i'm trying to use NSInvocation to pass arguments thru a switch statement, but i need a little help. the following code isn't working:
Code:
NSUInteger tapCount = [[touches anyObject] tapCount];
NSInvocation *invoke = [[NSInvocation alloc] init];
switch (tapCount)
{
case (2): {
[invoke setSelector:@selector(moveImage:withTouchPoint:withTapCount:)];
[invoke setArgument:nil atIndex:0];
[invoke setArgument:nil atIndex:1];
[invoke setArgument:tapCount atIndex:2];
[self performSelector:invoke withObject:nil afterDelay:kTapDelay];
}
[COLOR="SeaGreen"]//etc.[/COLOR]
any thoughts?