开发者

iphone nsurlconnection async, wait for done

My code ha开发者_StackOverflow中文版s a function (F1) to return YES/NO based on information read from server. So it uses async nsurlconnection to receive data. So F1 starts connection and MUST wait for data to be loaded

The question is how can i implement it?

thanks


Don't. Find a way to use asynchronous calls. You must not pause the run loop while waiting for results; your application will be killed.

Instead, re-factor your code to return control to Cocoa and make the completion resume your processing.

I think WWDC Session #200 covers this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜