francis
francis

Reputation: 710

Show another button when using "commitEditingStyle" in a UITableView datasource

I want to show an "Edit" button below the default "Delete" button that shows up with a swipe gesture on a cell when you implement "commitEditingStyle" on the table's datasource.

Is this possible by only implementing "commitEditingStyle" or will i have to implement my own way of showing the buttons on the cells? And if it is, how would i handle the commit?

Upvotes: 0

Views: 497

Answers (1)

hp iOS Coder
hp iOS Coder

Reputation: 3234

Yes you have to implement your own way of showing buttons on UITableViewCells by customizing the UITableViewCells.

As far as your requirement is concerned, I dont think its a good idea to show the "edit" button below the "delete" button, as accommodating both buttons vertically one-by-one may disappoint the user to make desired touch actions.

I mean to say, user may want to touch edit, but due to successive placing of custom edit/delete buttons, delete button may get clicked which is dangerous & not acceptable too. Of course,it will cause user to take proper care every-time making any of the edits.

Upvotes: 1

Related Questions