有没有办法在 RN 的 Image 组件上设置 userInteractionEnabled false?
问它是因为需要实现下面的设计。右侧有一个模糊覆盖。我们希望它下面的文字仍然可以处理点击,所以需要设置模糊图像 userInteractionEnabled 为 false。
userInteractionEnabled在react-native中相当于touchEventsviews的prop。
您可以在图像上将其设置为“none”,它将不再拦截触摸。 http://facebook.github.io/react-native/docs/view.html#pointerevents
| 归档时间: |
|
| 查看次数: |
1716 次 |
| 最近记录: |