IOS 异步获取数据并刷新界面dispatch_async的使用方法

  1. dispatch_async(dispatch_get_global_queue(0, 0), ^{ 
  2. // 处理耗时操作的代码块... 
  3. //通知主线程刷新 
  4. dispatch_async(dispatch_get_main_queue(), ^{ 
  5. //回调或者说是通知主线程刷新, 
  6. });
  7. });
posted on 2017-07-21 11:02  廖利君  阅读(483)  评论(0编辑  收藏  举报