I\'m writing a client-server app to iPhone. And I have a question about threading. When I access my online database from the device, I need to do this on a separate thread to no
Well, you're already using dispatch_async
. Then you should just use
dispatch_async(dispatch_get_main_queue(),^ { ... } );
from inside your background thread to perform things on the main thread. For example,
if ([self testServerMethod])
{
dispatch_async(dispatch_get_main_queue(),^ {
[self showMessageBoxWithString: @"Server is working!"];
[self threadedUIActivityRemover:nil];
} );
}else ...
It doesn't have any constraint on the number of arguments for the methods you call.