Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

awesome way to delete tableView cell

Replies

  • fatima21fatima21 chennaiPosts: 1 Noob
    best way to delete table view
  • PalanichamyPalanichamy ChennaiPosts: 5 Noob
    Awesome as well as easiest way to delete the TableView Cell is by using the following TableView methods.

    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return YES if you want the specified item to be editable.
    return YES;
    }

    // Override to support editing the table view.
    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {

    [arr removeObjectAtIndex:indexPath.row];
    [listTableview reloadData];

    //add code here for when you hit delete
    }
    }
  • BrianSlickBrianSlick Treadmill Desk Ninja Posts: 10,687 @ @ @ @ @ @ @ @
    Awesome as well as easiest way to delete the TableView Cell is by using the following TableView methods.

    This isn't the proper forum for this kind of response.

    And you typically shouldn't reloadData in commitEditingStyle.
    Professional iOS App Development. Available for hire.
    BriTer Ideas LLC - WWW | Facebook | Twitter | LinkedIn

    BTIKit | BTICoreDataKit | SlickShopper 2 | Leave a PayPal donation
Sign In or Register to comment.