首页 > 解决方案 > React-Native:如何使用模糊创建 UI

问题描述

过去几天我一直在苦苦挣扎,但还没有找到实现这个 UI 的解决方案(我附上了照片)。请帮我。我访问过 react-native-blur 但 buildToolsVersion 是 '25 .0.3 '(我不能决定在 23.xx 上编辑它)并且当我尝试使用 buildToolsVersion 25.0.3 时出现此错误:“BlurView 的本机组件' 不存在 ”

链接照片:https ://drive.google.com/file/d/1PiNDvPTrrWiZU8VLQj3DsczuC2-ssm_s/view?usp=sharing

标签: androiduser-interfacereact-native

解决方案


Android 的实现有点不同,因为您需要使用 findNodeHandle 并引用模糊的组件。这是适用于我的示例代码:

https://gist.github.com/harixth/d9414a63a859b2e19b13d9915fcaa00c


推荐阅读