iOS Question TableView Native Swipe to delete

Discussion in 'iOS Questions' started by narek adonts, Mar 4, 2015.

  1. narek adonts

    narek adonts Well-Known Member Licensed User

    I am trying to implement the native TableView fuction Swipe to delete

    Code:
    #If OBJC
    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
    {
        // Return YES - we will be able to delete all rows
        return YES;
    }

    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
    {
        // Perform the real delete action here. Note: you may need to check editing style
        //   if you do not perform delete only.
        NSLog(@"Deleted row.");
    }
    #End If

    it doesn't give any error but when swiping nothing is happening.
    Could you please advise how to implement this method correctly.

    Narek
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    I don't think that you will be able to handle this properly without an update to the library. I do plan to add support for editing mode.
     
  3. narek adonts

    narek adonts Well-Known Member Licensed User

    Hope soon )

    Narek
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice