ITeye博客

Grand Central Dispatch 并行任务管理

sking777 · 2013-12-26 15:12 · SmartPhone · 移动开发 · Markdown

例: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// 耗时的操作
dispatch_async(dispatch_get_main_queue(), ^{
// 更新界面
});
});

参考: https://developer.apple.com/library/ios/documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。