当我在如下所示的弧线上按任意位置时,在 Android 上,onPress 始终会被正确调用,但在 iOS 上,有时会调用 onPress,但有时不会。弧线的某些部分在 iOS 上是不可点击的。
此外,没有任何定位元素(绝对/相对定位)与弧重叠。
这是我的代码。
<Svg
height={deviceHeight - 200}
width={deviceWidth}
>
<Path
ref={ref => this.pathRef = ref}
fill="none"
stroke='rgba(214,51,51,.2)'
strokeWidth={35}
onPress={() => console.log('path on pressed called!')}
d="M 392.72727272727275 124.90909090909088 A 360 450 0 0 0 42.72727272727275 574.9090909090909"
/>
</Svg>
我还在 react-native-svg 包中记录了一个问题:https ://github.com/react-native-community/react-native-svg/issues/1256