I have an iPad application with UITableView, and I want to enable a user to reorder the table items by dragging the cell and move it before or after another cell, how I can do that ?
Tanks
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.
Implement
moveRowAtIndexPath:toIndexPath:method in your data shource to update the model on the end of the drag operation. ImplementtableView:canMoveRowAtIndexPath:to returnYESfor the rows that the user should be able to move. Here is a short tutorial on the subject.