Closed justdan0227 closed 3 years ago
Where is this table view (On left, main or right view controller)?
Is it a table view controller? Or a table view in a view controller?
Do you have a right view controller?
So sorry did not see this reply.. so my table view is in the main view and I want to allow swipe to delete without affecting the left view controller (right is not used)
You can use:
override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]?
Or:
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool
and
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath)
I had the same issue. The delegate swipe methods of table view aren't been called. I tried with UITableViewController, and UITableView within UIViewController.
What resolve to me:
In the view that i need the tableView delegate work. (inside viewdidAppear)
self.revealViewController()?.panGestureRecognizer?.isEnabled = false
The others view that use RevealController (in my case the mainView is a TabBar, in the viewDidAppear method too)
self.revealViewController()?.panGestureRecognizer?.isEnabled = true
Hope it help u.
Trying to get swipe to delete a row on table view. Do I need to disable pan left while on this view?