Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing primitives through performSelectorOnMainThread

Tags:

Ok, so say i have a second thread running, but it wants to manipulate something on the main thread, like a UI item.

-(void)backgroundThread
{
    [myButton performSelectorOnMainThread:@selector(setEnabled:) withObject:(BOOL)YES waitUntilDone:YES];
     // right here, how could i pass this BOOL to the function
}

I've tried using NSNumber's numberWithBOOL, but the NSButton doesn't accept it.