forkingdog / UITableView-FDTemplateLayoutCell

Template auto layout cell for automatically UITableViewCell height calculating
MIT License
9.93k stars 2.01k forks source link

reloadData卡顿 #330

Closed weiminghuaa closed 7 years ago

weiminghuaa commented 7 years ago

把demo的insertSection方法改一下,也能重现卡顿

- (void)insertSection {
//    [self.feedEntitySections insertObject:@[self.randomEntity].mutableCopy atIndex:0];
//    [self.tableView insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationAutomatic];
    dispatch_async(dispatch_get_global_queue(0, 0), ^{
        NSMutableArray *temp = [NSMutableArray array];
        for (int i = 0; i < 50; i++) {
            [temp addObject:[self randomEntity]];
        }
        [self.feedEntitySections[0] addObjectsFromArray:temp];
        dispatch_async(dispatch_get_main_queue(), ^{
            [self.tableView reloadData];
        });
    });
}

@weekwood @sunnyxx @afantree @philcn @wtlucky @wangyutao0424

weiminghuaa commented 7 years ago

上拉加载过程会有卡顿 #277

weiminghuaa commented 7 years ago

116 原来不可避免