I do not want animation in the begin updates, end updates block for uitableview?

前端 未结 6 1175
执念已碎
执念已碎 2020-12-22 22:43

I have a UITableView that is using a custom table cell and each cell has a UIWebView.

Because UIWebView took along time to load, i want to avoid reloading them at al

6条回答
  •  清酒与你
    2020-12-22 22:59

    I prefer to have a smooth transition:

    CGPoint offset = self.tableView.contentOffset;
    [UIView transitionWithView:self.tableView duration:0.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
            [self.tableView reloadData];
            self.tableView.contentOffset = offset;
        } completion:nil];
    

    give it a try.

提交回复
热议问题