Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native making bigger hitbox

//hitSlop: makes a bigger hitbox 20px top, 20px bottom, etc..
//but remember, this extra pixels you're adding, HAVE to be inside your component's parent area
<TouchableOpacity onPress={onBtn1Pressed} hitSlop={{top: 20, bottom: 20, left: 50, right: 50}}>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #native #making #bigger #hitbox
ADD COMMENT
Topic
Name
1+4 =