How to delete the customized cell in UITableView ?

Discussion in 'iOS Programming' started by srikanthrongali, May 1, 2010.

  1. srikanthrongali macrumors newbie

    Apr 30, 2010
    I have UITableView. I customized the cell height (increased).
    I have 4 labels(UILabel) and 1 image(UIImage) and 3 buttons (UIButton). one of the button is delete button. By touching the cell or button(play button) on the image a video is loaded and played.

    I need to delete the cell by touching delete button. If I touched the delete button the corresponding video is deleted from library . But, how to delete the cell and all remaining data in it ? I am not able to delete the cells or the data in the cells.

    How to do it ? I used these. But the control is not entering in to second method committedEditingStyle:

    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath   
    return YES;
      - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 
        if (editingStyle == UITableViewCellEditingStyleDelete)  
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    You don't delete cells: you delete the objects in you data model and ask the view to reload. You can specifically ask it to reload specific rows with a fade animation if you want...

Share This Page