iosswiftuitableviewcelluicontextualaction

How to set the corner radius of a UIContextualAction?


I haven't found anything on how to do this so I am asking a question.

I made a cell with three actions:

  1. A check action,
  2. an edit action,
  3. and a delete action.

The only problem is that my cell has a corner radius to it and I want my actions to also have a corner radius. How do I set the corner radius of a UIContextualAction?

Is this even possible?


Solution

  • Because UIContextualAction inherits from NSObject, there's no layer to draw or adjust. You'll have to build your own utility underlay view and swipe gesture, or use something like SwipeCellKit which supports custom styled contextual actions.