reloadRowsAtIndexPaths:withRowAnimation: crashes my app

后端 未结 8 1987
谎友^
谎友^ 2021-02-07 01:33

I got a strange problem with my UITableView: I use reloadRowsAtIndexPaths:withRowAnimation: to reload some specific rows, but the app crashes with an seemingly unre

8条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-07 01:48

    I think the following code might work:

    [self.tableView beginUpdates];
    
    [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:0]] withRowAnimation:UITableViewRowAnimationFade];
    
    [self.tableView endUpdates];
    

提交回复
热议问题