UITableView Delete When the crash Nsscanner:nil string argument

Source: Internet
Author: User

It's been a day of breaking up today, and it's worth remembering.

 

-(void) TableView: (UITableView *) TableView Commiteditingstyle: (uitableviewcelleditingstyle) Editingstyle Forrowatindexpath: (Nsindexpath *) Indexpath

{

if (_segment.selectedsegmentindex = = 0) {

[_allarray RemoveObjectAtIndex:indexPath.row];

[TableView Deleterowsatindexpaths:@[indexpath] withrowanimation:uitableviewrowanimationautomatic];

Data source _allarray is retrieved from the background
Is this: in the TableView to delete a row when the crash, what crash information is not, is a sentence, nsscanner:nil string argument, how to find a bug, then a flash, add a sentence

 

Self.allarray = [Nsmutablearray arraywitharray:[dic objectforkey:@ "data"]]; How to solve the idea of how to think, I defined is a variable array, from the background to obtain data after the assignment to Self.array, how can he become immutable? The bug is solved, but the problem does not understand, later still pay attention to point

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.