开发者

XML parsing on new thread

开发者 https://www.devze.com 2022-12-31 19:17 出处:网络
In my application, I want to fetch new xml data after user scrolls through tableview and pulls the first cell down. As the data is load开发者_高级运维ed in tableview in chronological order, the update

In my application, I want to fetch new xml data after user scrolls through tableview and pulls the first cell down. As the data is load开发者_高级运维ed in tableview in chronological order, the updated data will be shown before the first cell.

I want to run this process on new thread, so what is the best option :

  1. Subclass NSThread and use its instance

  2. Subclass NSOperation and use its instance

  3. Use NSThread methods directly

Thanx in advance.


Subclass NSOperation, it's much more convenient than NSThread.

Take a look at this post which help me a lot : http://www.cimgf.com/2008/02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/

0

精彩评论

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