Spacing between UITableViewCell and UITableViewRowAction

161 Views Asked by At

Is it is possible to add spacing between the UITableViewCell and UITableViewRowAction and is possible to add corner radius to UITableViewRowAction as per attached UI. Find attachment Here!!

2

There are 2 best solutions below

2
Dilan On

Directly you cannot add space between UITableViewCells.You should use some tricky points to achieve this.I think you can get an idea from this.

Some Points

0
Samps On

You can access that view like that:

override func layoutSubviews() {
    super.layoutSubviews()
    if let deleteView = tableView.subviews
        .first(where: { $0.classForCoder.description() == "UISwipeActionPullView" }) {
        deleteView.layer.cornerRadius = 10
    }
}

PS! Might not be future proof, if apple changes anything. Maybe helps you.