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

Add support for hitSlop on buttons on iOS #283

Merged

Conversation

janicduplessis
Copy link
Contributor

This adds support for hitSlop for buttons on iOS. Android already has support for it. This is pretty much a copy paste from the implementation in RCTView.

Ideally we'd be able to reuse some of that code for support for things like border but I can't really think of a good solution if we want to use UIButton. hitSlop is pretty important to add since we cannot work around it by adding an extra view (like we can for things like border).

Test plan
Tested these changes in an app and made sure hit slop affected properly the touch area of a Button.

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks a lot @janicduplessis

@kmagiera kmagiera merged commit 4c12a73 into software-mansion:master Sep 10, 2018
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

Successfully merging this pull request may close these issues.

2 participants