0

Using the following code in a class that has more than one edit action - slide to left and move row results in IOS 9.3 devices not allowing the slide to left but allows the move. Both actions work fine in IOS 10+. Removing this code allows 9.3 & 10+ to do both actions however the red delete button now appears on the left when a move row action is instituted

func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCellEditingStyle {
    return .none
}

The code is in an UIViewController class which has a table that has a single prototype cell.

Every other feature works without any issues.

Is there any way to selectively call this function. ie call it only for IOS 10+ devices?

Jeremy Andrews
  • 807
  • 12
  • 17

1 Answers1

0

If you wand to use something for certain iOS:

if #available(iOS 10.0, *) {
        //do what you need
}

But you can specify this already in the function itself.

maxwell
  • 3,788
  • 6
  • 26
  • 40