Replace the UITableView Delete button with a segmented button

I have a UITableView in my application that allows the user to close applications on a remote computer. I would like to allow the user to select from Force Quit or regular Quit using the normal delete button. Here is a quick layout that I have in mind:

enter image description here

First, is this possible? Secondly, how can I implement this? I am assuming something like a UISegmentedControl with the same red tint. I would also like to know this shade;)

+4
source share
1 answer

The first thing I thought: Set the β€œedit” property of each row to β€œNO,” then add a UISwipeGestureRecognizer to the cell and attach a selector to it that generates your segmented control in the cell. I suggest subclassing UITableViewCell and overriding the initWithFrame method.

+1
source

Source: https://habr.com/ru/post/1344345/


All Articles