This is my code:
[delegate performSelectorOnMainThread:@selector(setVariablePremierAffichage:) withObject:TRUE waitUntilDone:NO];
The problem is that the argument "withObject" only takes an "id" type, so, how can I cast my value "TRUE" to an id type? I also use ARC memory management in Xcode for iOS 5.
Pass an NSNumber
. Use boolNumber = [NSNumber numberWithBool:TRUE]
. Your method should be defined as:
-(void)setVariablePremierAffichage:(NSNumber *)boolNumber
{
BOOL value = [boolNumber boolValue];
// do something
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With