Skip to content

Improve Hit Test Coordinate Conversion #10

Description

@DaveBatton

Tapping the Move and Delete buttons in my table view cell didn't trigger any actions. I was able to trace it down to incorrect conversion of the cell's rect in the -overlayView:didHitTest:withEvent: delegate method. So I changed this:

CGRect rect = [self.view convertRect:self.cellDisplayingMenuOptions.frame toView:self.view];

To this:

CGRect rect = [self.cellDisplayingMenuOptions.superview convertRect:self.cellDisplayingMenuOptions.frame toView:self.view];

I realize it's just a delegate method and it may need to be different for each app, but this might be a more likely-to-work solution than assuming the cell's superview shares the same frame as the view controller's view.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions