Search code examples
objective-cpthreadsthread-sleep

Pausing the Current function for some time iphone


Hi all im trying to pause a function so some time in the middle of execution because ill have to wait for the call back functions from GData api and get my data ready to put in that function i dont know how to do that. I am developing in Xcode 4.2 really need some help


Solution

  • You need to consider redesigning a little bit. What ever portion of code you expect to process after callback happens, let that code called by the callback. That way it will give you the guarantee that it always executes after the callback.