解决方案 »

  1.   

    执行删除操作之后,执行[tableview reloadData];
      

  2.   

    因为在首次绘制TableViewDelede的时候就把tableviewDid那个点击删除的方法是最后走了,你在删除完之后必须再次[tableview reloadData]然后才能重新执行TableViewDelede,然后就重新请求数据了,如果真的删除了,就应该显示新的数据。
      

  3.   

    我就是这样做的,删除以后 reloadData, 数据库是删除了,但是tableView 还是显示啊
      

  4.   

      -----这里是查询操作 从数据库获取信息-----
        NSArray *apArr=[[NSArray alloc]init];
        apArr=[ap selectAll];
    ------这里是用来显示信息的tableView--------(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *cellId=@"cell";
        
        
        
        cell=[tableView dequeueReusableCellWithIdentifier:cellId];
        if (cell==nil) {
            cell=[[MyCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellId];
        }
        nameLabel=[[UILabel alloc]initWithFrame:CGRectMake(80, 5, 60, 40)];
        
        [cell.contentView addSubview:nameLabel];
        
        phoneLabel=[[UILabel alloc]initWithFrame:CGRectMake(140, 5, 160, 40)];
        
        [cell.contentView addSubview:phoneLabel];
        
        
        imgLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 60, 60)];
        
        
        myImage=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 60, 60)];
        model=[array objectAtIndex:[indexPath row]];
        
        [myImage setImage:[UIImage imageWithData:Info.image]];
        [imgLabel addSubview:myImage];
        [cell.contentView addSubview:imgLabel];
        
        nameLabel.text=[[array objectAtIndex:[indexPath row]]name];
        phoneLabel.text=[[array objectAtIndex:[indexPath row]]tel];
        cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
        
        return cell;
    ---------------删除操作的文件-----------
    -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
    {
        if (buttonIndex==0) {
            if ([app deleteDao:md.name]) {
               
               Index *index=[[Index alloc]init];
                [index.table reloadData];
                [self.navigationController popViewControllerAnimated:YES];
               [index release];
                
            }
            
        }else{
            NSLog(@"取消");
        }
        
    }
      

  5.   

    首先执行数据库的Delete操作,然后重新获取数据[[ap selectAll]] (或者把数据源数组中的那个Object删除掉),重新reloadData   。
      

  6.   

    Index *index=[[Index alloc]init];
    [index.table reloadData];
    [self.navigationController popViewControllerAnimated:YES];
    [index release];
    你这段代码完全看不懂啊,你要获取之前已经初始化好的UITableView来reloadData
      

  7.   

    Index *index=[[Index alloc]init];
    [index.table reloadData];重新new一个还是原来的那个么?
      

  8.   

    怎么解决的 我也写通讯录 死在数据库上了...数据更新不了 qq 350906309 LZ有时间给我指点下可以么