zoukankan      html  css  js  c++  java
  • 多线程更新ui

     dispatch_async(

                               dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)

                               , ^{

    .....

     dispatch_async(dispatch_get_main_queue(), ^{

                                       [self createData];

                                       NSIndexSet *index = [NSIndexSet indexSetWithIndex:1];

         [_tableView reloadSections:index withRowAnimation:UITableViewRowAnimationNone];

                                   });

                               });

    回到主线程更新tableview,否则更新很不及时

  • 相关阅读:
    禅道学习(一)
    遍历
    php特性
    jsonRPC
    model
    水仙花数(详细2
    水仙花数(详细1
    递归求n 项和
    poj 1651
    nyist 289
  • 原文地址:https://www.cnblogs.com/ios-wyh/p/4301780.html
Copyright © 2011-2022 走看看