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

Improve Hit Test Coordinate Conversion #10

Open
DaveBatton opened this issue May 6, 2014 · 0 comments
Open

Improve Hit Test Coordinate Conversion #10

DaveBatton opened this issue May 6, 2014 · 0 comments

Comments

@DaveBatton
Copy link

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.

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

1 participant