Expanding table view cells disappearing

前端 未结 7 1430
逝去的感伤
逝去的感伤 2021-02-12 23:36

I have cells that expand by changing their height with a setExpanded: method call.

I then call reloadRowsAtIndexPaths: to refresh the cells.

The problem is the c

7条回答
  •  攒了一身酷
    2021-02-13 00:22

    you could try reloading the table view when the animations have completed? at the moment if your animations are fired, and then you call [tableView reloadData] the animations won't be complete, so the frame etc may get out of sync

    you could change your set expanded method to take a flag as well as an animation completion block, which could contain the reload code

    [cell setExpanded:YES completion:^
        //reload code
    }];
    

提交回复
热议问题