Here's the code:
for(int i = 0; i < personListViewController.peopleCount; i++) {
[NSThread detachNewThreadSelector:@selector(getPerson:) toTarget:self withObject:i];
}
getPerson looks like this:
- (void)getPerson:(int)whichPerson { }
When I build this, I get the following :warning: passing argument 3 of 'detachNewThreadSelector:toTarget:withObject:' makes pointer from integer without a cast
All I want to do is pass an int to getPerson via detachNewThreadSelector and I can't figure out how the heck to get it to take anything but an object pointer. What am I missing here?