ios - Table view cell deletion animation not working -
ios - Table view cell deletion animation not working -
-(void)tableview:(uitableview *)tableview commiteditingstyle:(uitableviewcelleditingstyle)editingstyle forrowatindexpath:(nsindexpath *)indexpath { if (editingstyle == uitableviewcelleditingstyledelete) { [self.myarray removeobjectatindex:indexpath.row]; [self.tableview deleterowsatindexpaths:[nsarray arraywithobject:indexpath] withrowanimation:uitableviewrowanimationfade]; } }
changing animation type of other options not create difference, seem same animation every time. i've read due ios 7
bug, deployment target ios 8
. ideas?
if (editingstyle == uitableviewcelleditingstyledelete) { if ([self.myarray count] >= 1) { [self.tableview beginupdates]; [self.tableview deleterowsatindexpaths:[nsarray arraywithobject:indexpath] withrowanimation:uitableviewrowanimationfade]; [self.myarray removeobjectatindex:[indexpath row]]; [self.tableview endupdates]; } }
try this
ios objective-c uitableview animation
Comments
Post a Comment