多线程更新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,否则更新很不及时

posted @ 2015-02-26 17:33  阳光天  阅读(150)  评论(0编辑  收藏  举报