Skip to content

Add support for hitSlop on buttons on iOS#283

Merged
kmagiera merged 1 commit intosoftware-mansion:masterfrom
janicduplessis:ios-button-hit-slop
Sep 10, 2018
Merged

Add support for hitSlop on buttons on iOS#283
kmagiera merged 1 commit intosoftware-mansion:masterfrom
janicduplessis:ios-button-hit-slop

Conversation

@janicduplessis
Copy link
Copy Markdown
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
Copy Markdown
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