I have working code:
[self performSelector:@selector(doSomething) ];
but when I change this line to:
[self performSelector:@selector(doSomething) withObject:nil afterDelay:1.0];
it reports error – unrecognized selector….
could you tell me what is the problem in?
thank you
If you changed your method to take an object parameter then you need to change the
@selector()argument to include the “:”, e.g.,@selector( doSomething: )This works:
So you can pass a selector that takes no param to
performSelector:withObject:afterDelay:and I presume it ignores thewithObject:param which I wasn’t 100% sure of.