Can I doing this?
Replies
What do you want to change ? The color of the button ?
If so, look at this :
var backgroundColor: UIColor?
UITableViewRowAction
A single action to present when the user swipes horizontally in a table row.
Declaration
class UITableViewRowAction : NSObject
Overview
In an editable table, performing a horizontal swipe in a row reveals a button to delete the row by default. This class lets you define one or more custom actions to display for a given row in your table. Each instance of this class represents a single action to perform and includes the text, formatting information, and behavior for the corresponding button.
To add custom actions to your table view’s rows, implement the
tableView(_:editActionsForRowAt:)
method in your table view’s delegate object. In that method, create and return the actions for the indicated row. The table handles the remaining work of displaying the action buttons and executing the appropriate handler block when the user taps the button.Topics
Configuring the Action’s Appearance
var style: UITableViewRowAction.Style
The style applied to the action button.
var title: String?
The title of the action button.
var backgroundColor: UIColor?
The background color of the action button.
I want to change color of title of button. I mean (for example)
button.titleLabel?.textColor = UIColor.orange
There is no direct way to do it, which means it is probably not a very good idea to try (and why should it be needed in fact ?).
But found a work around here.
https://stackoverflow.com/questions/26887563/how-to-change-uitableviewrowaction-title-color
Asked same question before 2 year ago, still didn't get answered.
https://forums.developer.apple.com/thread/53088