Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7193047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:05:23+00:00 2026-05-28T20:05:23+00:00

I want to be able to swipe left or right anywhere in a table

  • 0

I want to be able to swipe left or right anywhere in a table view cell to erase the cell of with animation without showing the delete button. How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:05:23+00:00Added an answer on May 28, 2026 at 8:05 pm

    I have not tried and implemented this, but I’ll give it a shot. First, create a custom UITableViewCell, and let it have 2 properties that you can use

    1. A reference to the tableView it is being used in.
    2. An indexPath to find the cell in the tableView.(Note, this needs to be updated everytime you delete a cell for all cells where this changes)

    In your cellForRowAtIndexPath:, where you create the custom cell, set these properties. Also add a UISwipeGestureRecognizer to the cell

    cell.tableView=tableView;
    cell.indexPath=indexPath;
    UISwipeGestureRecognizer *swipeGestureRecognizer=[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(deleteCell:)];
    [cell addGestureRecognizer:swipeGestureRecognizer];
    [swipeGestureRecognizer release];
    

    Make sure that the gesture only receives horizontal swipes.

    -(BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
    {
        if([[gestureRecognizer view] isKindOfClass:[UITableViewCell class]]&&
           ((UISwipeGestureRecognizer*)gestureRecognizer.direction==UISwipeGestureRecognizerDirectionLeft
            ||(UISwipeGestureRecognizer*)gestureRecognizer.direction==UISwipeGestureRecognizerDirectionRight)) return YES;
    }
    

    In your deleteCell:

    -(void) deleteCell:(UIGestureRecognizer*)gestureRec
    {
        UIGestureRecognizer *swipeGestureRecognizer=(UISwipeGestureRecognizer*)gestureRec;
        CustomCell *cell=[swipeGestureRecognizer view];
        UITableView *tableView=cell.tableView;
        NSIndexPath *indexPath=cell.indexPath;
        //you can now use these two to perform delete operation
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually i want to implement swipe left and right in UIScrollview. i have scrollview
I want to unit test a swipe left/right action on the screen in Android
I want to be able to swipe through a series of images in my
Right now I'm able flip views using sliding. I want to flip views automatically
What I want to do is have two 'frames'. Left and Right. At application
Grettings to you... i want to paginate when the user swipe on the left
I just want to be able to swipe to a new nib, but am
I am implementing a swipe to delete functionality in uitableview. I am able to
I'm using LaTeX and BibTeX for an article, and I want to able to
Want to be able to provide a search interface for a collection of objects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.