4

如果我UITableViewController通过快速轻弹手指(而不是缓慢的拖动和释放)来“拉动刷新”,我的应用程序会因EXC_BAD_ACCESS (code=1, address=0x30000008)错误而崩溃。

以下是相关代码:

- (void)refreshView:(UIRefreshControl *)refresh
{
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        [self populateWhatsOn];
        dispatch_async(dispatch_get_main_queue(), ^ {
            [self.refreshControl endRefreshing];
        });
    });
}

任何帮助将不胜感激!

4

1 回答 1

-1

检查是否populateWhatsOn使用endRefreshing. 如果是这样,请创建一个单独的队列并在此队列中执行任何常见更改。

于 2013-12-18T12:44:55.637 回答