I am new to multi threading in xcode for iphone. i would like to load and parse data from server in another thread and periodically. Can anyone help me?
thanks
I am new to multi threading in xcode for iphone. i would like to load and parse data from server in another thread and periodically. Can anyone help me?
thanks
You could use GCD event dispatch sources.
Apple's Concurrency Programming Guide includes a sample on how to setup a timer.
Their sample code runs the block on the main queue. If you want it on a background thread, you could pass a queue obtained with dispatch_get_global_queue instead of dispatch_get_main_queue().
You can use performSelector method, If need to have more clear idea navigate to this link iPhone: how to use performSelector:onThread:withObject:waitUntilDone: method?