Expanding table view cells disappearing

前端 未结 7 1664
傲寒
傲寒 2021-02-12 23:52

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:23

    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
    }];
    

提交回复
热议问题