array删除报错

来源:互联网 发布:windows github 编辑:程序博客网 时间:2024/06/10 09:28
@property (strong, nonatomic) NSMutableArray *dicarray;

-(void)parsingJson
{
    NSUserDefaults *Store_Update = [NSUserDefaults standardUserDefaults];
    id jsonObject=[Store_Update objectForKey:@"json"];
    if ([jsonObject isKindOfClass:[NSDictionary  class]])
    {
        NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithDictionary:jsonObject];
        self.dicarray=[dictionary objectForKey:@"Name"];
    }else
    {
        NSLog(@"ぶしで");
    }
}


- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if(editingStyle==UITableViewCellEditingStyleDelete)
    {
        [self.dicarray removeObjectAtIndex:[indexPath row]];
    }
    [self.tableview deleteRowsAtIndexPaths:self.dicarray withRowAnimation:UITableViewRowAnimationAutomatic];
    [tableView reloadData];
}


走到删除的时候就蹦了,

求诸位指导。
0 0
原创粉丝点击