在新线程上解析 XML

发布于 2024-09-02 16:56:09 字数 253 浏览 0 评论 0原文

在我的应用程序中,我想在用户滚动表视图并下拉第一个单元格后获取新的 xml 数据。由于数据按时间顺序加载到表格视图中,因此更新的数据将显示在第一个单元格之前。

我想在新线程上运行这个过程,那么最好的选择是什么:

  1. 子类 NSThread 并使用其实例

  2. 子类 NSOperation 并使用其实例

  3. 直接使用 NSThread 方法

提前感谢。

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 loaded 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两仪 2024-09-09 16:56:09

子类NSOperation,比NSThread方便很多。

看看这篇文章,它对我帮助很大:
http://www.cimgf.com/2008 /02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文