0

I'm trying to use an NSTimer with invocation but i have problems with 2 things. I don't know how to get the Selector to pass Arguments(Xcode crys) or how to get it work in general since it always crashs.

X = [NSTimer scheduledTimerWithTimeInterval:(1.0) invocation:(invoX) repeats:(YES);

with this:

SEL selX = @selector(methodY); //like i actually do to avoid errors
SEL selX = @selector(Y:(argument)); //like i want it to be  
NSMethodSignature *sigX = [self methodSignatureForSelector:selX];
NSInvocation *invoX = [NSInvocation invocationWithMethodSignature:sigX];
[invoX setTarget:self];
[invoX setSelector:selX];

but i don't get it to work(exception when running) anyone know whats wrong?

Coltan
  • 73
  • 1
  • 3

0 Answers0