1

I have the following code4 which worked in Swift 2 but does not work on upgrading the code to Swift 3 / Xcode 8.2

Error: Missing argument for parameter rawValue in call

Here is my problem code. The error is triggered at line 2.

func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
    return [UITableViewRowAction(style: UITableViewRowActionStyle(), title: "Remove", handler: { (_, _) -> Void in
    //        return [UITableViewRowAction(style: UITableViewRowActionStyle(), title: "Remove", handler: { (_, _) -> Void in
        self.tableView(self.shoppingCartTableView, commit: .delete, forRowAt: indexPath)
    })]
}
markhorrocks
  • 1,199
  • 19
  • 82
  • 151

1 Answers1

3

UITableViewRowActionStyle is enum.

Code below should work:

UITableViewRowActionStyle.default

or just

.default
spafrou
  • 548
  • 1
  • 6
  • 19