I have a few functions that I need to call when I press a button. I use [self getamountofdatacenters];
to call these functions. When I press the button, the simulator gets stuck until its done with all the functions, and this takes 5-7 seconds, so I'm trying to use NSThread
:
[NSThread detachNewThreadSelector:@selector(GETAMOUNTDATACENTERS)
toTarget:self
withObject:nil];
I'm doing this three times with different functions, but I want to find out what the progress is of an NSThread
and to catch it when it's actually done. How can I do this? Thank you.