您的位置:首页 > 产品设计 > UI/UE

IOS开发之多线程GCD和NSOperationQueue,NSOpration

2013-08-07 14:37 459 查看
转载地址:http://mobile.51cto.com/iphone-403490.htm

在iOS的世界里有两种实现多线程的方式:

第一种:GCD

官网链接

http://developer.apple.com/library/ios/#documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html#//apple_ref/doc/uid/TP40008079

一个教程

http://www.dreamingwish.com/dream-category/toturial/gcd-guide

一篇博客

http://blog.devtang.com/blog/2012/02/22/use-gcd/

第二种:NSOperationQueue和NSOperation

博客

http://daimajishu.iteye.com/blog/1085725

关于这两者的比较,支持者们意见不统一太统一。这个还是建议初学者都用用,然后自己权衡。适时选择合适的。这里也附上stackoverflow上的讨论情况。

http://stackoverflow.com/questions/10373331/nsoperation-vs-grand-central-dispatch
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: