I have a timer that calls a method, but this method takes one parameter:
theTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval target:self selector:@selector(timer) userInfo:nil repeats:YES];
it should be
theTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval target:self selector:@selector(timer:game) userInfo:nil repeats:YES];
now this syntax does not seem to be correct. I tried with NSInvocation, but I am having problems:
timerInvocation = [NSInvocation invocationWithMethodSignature: [self methodSignatureForSelector:@selector(timer:game)]]; theTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval invocation:timerInvocation repeats:YES];
How do I use Invocation?
objective-c arguments nstimer nsinvocation
Michele
source share