user3592462 user3592462 - 1 year ago 851
Swift Question

UITableViewRowAction image for title

I made a custom UITableViewRowAction. Now I'd like to add an image instead of the text. I know that it's possible but don't know how to do it.
Does someone of you knows how to do this in Swift and would like to help me?
Thanks for your answers!

Answer Source

You need to set UIImage to backgroundColor of row action, concretely by:


UIColor(patternImage: UIImage(named: ""))


[UIColor colorWithPatternImage:[UIImage imageNamed:@""]];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download