ios - if delete first section - app crash -
If I delete the last cell in my sections, then I have to delete the section
to start - This work is right, but if I delete my first section - app crash
and delete my last sections - Add button
What happens?
My code
- (minus) deleteExerciseFromCustomTable: (NSIndexPath *) indexPath {[[_exercises objectAtIndex: indexPath.section] removeObjectAtIndex: indexPath .row]; [_previewTable start update]; [_Remove Removal Delete RAATI and XEpath: @ [IndexPath] with RA-Animation: UITTViewerAnonymous Right]; [_previewTable End and Update]; If ([[object Otandaksaksaksaks: Indekspethksekshn] count] == 0) {[_group removeObjectAtIndex: indexPath.section]; [_previewTable start update]; [_praviawtable Deletesekshns [Nsindeksset Indekssetvithindeks: Indekspatksekshn] Vithrovnimsn: Uitblaviawrovnimsnrigt]; [_previewTable End and Update]; }} - (NSInteger) tableView: (UITableView *) tableView numberOfRowsInSection: (NSInteger) section {if (section == [separate group count]) {return 1; } And {return [[_exercises ObjectAntxX: section] count]; }} - (NSInteger) numberOfSectionsInTableView: (UITableView *) table view {return [_group count] + 1; }
Comments
Post a Comment