How to remove row and sections from UITableView Sections based on NSDictionary Data Modal? -
code mentioned below deleting particular row
- (void)tableview:(uitableview *)tableview commiteditingstyle: (uitableviewcelleditingstyle)editingstyle forrowatindexpath:(nsindexpath *)indexpath { if (editingstyle == uitableviewcelleditingstyledelete) { // delete row data source // need remove nsdictionary *contact = [[self.sections valueforkey:[[[self.sections allkeys] sortedarrayusingselector:@selector(localizedcaseinsensitivecompare:)] objectatindex:indexpath.section]] objectatindex:indexpath.row]; nslog(@"contact %@",contact); [self.sections removeobjectforkey:contact]; nslog(@"%@",self.sections); [tableview deleterowsatindexpaths:[nsarray arraywithobject:indexpath] withrowanimation:uitableviewrowanimationfade]; // crashing @ above line of code , shows error message see @ bottom of post } }
from above code able load uitableview correctly app crashes when trying delete commiteditingstyle: method ?
error message: 2013-05-13 15:13:33.353 indexed tableview final[1372:207] assertion failure in -[uitableview _endcellanimationswithcontext:], /sourcecache/uikit_sim/uikit-1912.3/uitableview.m:1046
Comments
Post a Comment