Uitableviewrowaction Access Button

[Solved] Uitableviewrowaction Access Button | Swift - Code Explorer | yomemimo.com
Question : UITableViewRowAction access button

Answered by : avraz-sardar

 override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? { let delete = UITableViewRowAction(style: .Default, title: "\u{267A}\n Delete") { action, index in print("more button tapped") self.tableView(tableView, commitEditingStyle: UITableViewCellEditingStyle.Delete, forRowAtIndexPath: indexPath) } delete.backgroundColor = UIColor(rgba: "#ef3340") let apply = UITableViewRowAction(style: .Default, title: "\u{2606}\n Like") { action, index in print("favorite button tapped") self.tableView(tableView, commitEditingStyle: UITableViewCellEditingStyle.Insert, forRowAtIndexPath: indexPath) } apply.backgroundColor = UIColor.orangeColor() let take = UITableViewRowAction(style: .Normal, title: "\u{2605}\n Rate") { action, index in print("share button tapped") self.tableView(tableView, commitEditingStyle: UITableViewCellEditingStyle.None, forRowAtIndexPath: indexPath) } take.backgroundColor = UIColor(rgba: "#00ab84") return [take, apply, delete]
}

Source : https://stackoverflow.com/questions/27740884/uitableviewrowaction-title-as-image-icon-instead-of-text | Last Update : Tue, 26 Jan 21

Answers related to uitableviewrowaction access button

Code Explorer Popular Question For Swift