Is there any way to send a BOOL
in selector ?
[self performSelector:@selector(doSomething:) withObject:YES afterDelay:1.5];
Or I should use NSInvocation
? Could somebody write a sample please ?
you can use NSNumber to wrap bools types:
BOOL myBool = YES;
NSNumber *passedValue = [NSNumber numberWithBool:myBool];
[self performSelector:@selector(doSomething:) withObject:passedValue afterDelay:1.5];
and in the selector, to get the bool value, you use:
BOOL value = [recievedObject boolValue];