Hi all,
I'm having a problem with performSelector. It works if I call a method without parameters, but it doesn't even call the method if I pass a parameter.
Example:
- (void)test
{
NSLog(@"test"); //it works!!
}
...
[self performSelector:@selector(test) withObject:nil afterDelay:1.0];
- (void)switchOn:(NSNumber *) index
{
NSLog(@"switchOn"); //it doesn't work :-(
}
....
NSLog(@"int is %d", [((NSNumber *)obj) intValue]); //print the correct value
[self performSelector:@selector(switchOn:) withObject:obj afterDelay:1.0];
I get no errors neither. Where could it be the problem?
thanks