You can insert intin NSNumber. If your method signature is:
- (void)passAnInt:(NSNumber *)someNumber;
Then you can call it using:
int someInt = 5;
NSNumber *num = [NSNumber numberWithInt:someInt];
[myController performSelectorInBackground:@selector(passAnInt:) withObject:num];
Then in your method you can return intagain using the NSNumber method intValue. See the NSNumber link for more details .
source
share