I have one UITableView, two arrays and segmented control. When segmented control index is "1", UITableView display data from first array, when index is "2" - second array. I want to swipe to delete function only in second segment. How can I do that? I am thinking of some "if statements" in
tableView(tableView: UITableView, commitEditingStyle editingStyle:
UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath)
but i don't know where to put them.