-1

Possible Duplicate:
UITableViewCell show delete button on swipe
iPhone Dev: Swipe a UITableCell

i want to create delete button when user swipe a cell in table view.If user swipe a cell table goes into edit mode and allows them to delete a swipe cell.

Community
  • 1
  • 1
Developer
  • 1,435
  • 2
  • 23
  • 48

2 Answers2

3
 - (void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
 {
    if(editingStyle == UITableViewCellEditingStyleDelete)
        {
                    yourTableView.editing = YES;
                    // your code for deletion here
        }


 }
mayuur
  • 4,736
  • 4
  • 30
  • 65
2

U can refer to this.

Mobile App Dev
  • 1,824
  • 3
  • 20
  • 45