Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left swipe evoke (almost always) right swipe behavior #429

Open
tomCompsoft opened this issue Sep 27, 2021 · 1 comment
Open

Left swipe evoke (almost always) right swipe behavior #429

tomCompsoft opened this issue Sep 27, 2021 · 1 comment

Comments

@tomCompsoft
Copy link

My code:

    func tableView(_: UITableView, editActionsForRowAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]? {
        print("orientation", indexPath, orientation)

        switch orientation {
        case .right:
            let deleteAction = SwipeAction(style: .destructive, title: "Right") { _, _ in
                // handle action by updating model with deletion
            }

            deleteAction.image = UIImage(named: "binIcon")
            return [deleteAction]
        case .left:
            let deleteAction = SwipeAction(style: .destructive, title: "Left") { _, _ in
                // handle action by updating model with deletion
            }

            deleteAction.image = UIImage(named: "binIcon")
            return [deleteAction]
        }
    }

in log I see always orientation as right:

orientation [0, 0] right
orientation [0, 1] right
orientation [0, 2] right
orientation [0, 3] right

please look at the behavior

ezgif com-gif-maker

@housecode
Copy link

got same issue with version 2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants