在本机反应中设置 userInteractionEnabled false

Yuj*_* Wu 5 react-native

有没有办法在 RN 的 Image 组件上设置 userInteractionEnabled false?

问它是因为需要实现下面的设计。右侧有一个模糊覆盖。我们希望它下面的文字仍然可以处理点击,所以需要设置模糊图像 userInteractionEnabled 为 false。

在此处输入图片说明

Jan*_*sis 1

userInteractionEnabled在react-native中相当于touchEventsviews的prop。

您可以在图像上将其设置为“none”,它将不再拦截触摸。 http://facebook.github.io/react-native/docs/view.html#pointerevents