ios - Assertion failure when delete rows in UITableView -
when delete row in tableview,i getting following exception:
*** assertion failure in -[uitableview _endcellanimationswithcontext:], /buildroot/library/caches/com.apple.xbs/sources/uikit_sim/uikit-3512.60.7/uitableview.m:1716
and here's part of code:
[self.feedlistview.tableview beginupdates]; [self.feedlistview.tableview deleterowsatindexpaths:@[ atindexpath ] withrowanimation:uitableviewrowanimationfade]; [self.feedlistview.tableview endupdates];
and screenshot:
any appreciated.
thanks
you need remove feedtodelete self.allfeeds:
[self.feedlistview.tableview beginupdates]; nsmutablearray *array = [self.allfeeds mutablecopy]; [array removeobject:feedtodelete]; self.allfeeds = array; [self.feedlistview.tableview deleterowsatindexpaths:@[ atindexpath ] withrowanimation:uitableviewrowanimationfade]; [self.feedlistview.tableview endupdates];
Comments
Post a Comment