Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

srikanthrongali

macrumors newbie
Original poster
Apr 30, 2010
21
0
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:

Code:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath   
 {
return YES;
 }  


  - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 
{
    if (editingStyle == UITableViewCellEditingStyleDelete)  
     {
     }
}

uploadsc2036dee19.png
 
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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.