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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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
In your
cellForRowAtIndexPath:, where you create the custom cell, set these properties. Also add a UISwipeGestureRecognizer to the cellMake sure that the gesture only receives horizontal swipes.
In your
deleteCell: