[英]How to custom Image Picker like Facebook in React Native with Expo?
I want to customize Image Picker like Facebook does (image below) in React Native.我想像 Facebook 在 React Native 中那样自定义图像选择器(下图)。 But I cannot find any articles about this.
但是我找不到任何关于此的文章。
I have used expo-image-picker but it just shows Photo Library for picking images.我使用过 expo-image-picker 但它只显示用于挑选图像的照片库。 But I just want to load all images from Photo Library and have my custom header (something like Facebook app).
但我只想加载照片库中的所有图像并拥有我的自定义 header(类似于 Facebook 应用程序)。
Does anyone know how to customize Image Picker?有谁知道如何自定义图像选择器? Please give me an instruction.
请给我一个指示。 Thank a lot.
非常感谢。
Check out libraries like react-native-cameraroll which could help with that.查看像react-native-cameraroll这样的库,它可以帮助解决这个问题。 They allow you to read the images from cameraroll and you can decide what to do with it afterwards (eg. rendering into your custom UI)
它们允许您从 cameroll 中读取图像,然后您可以决定如何处理它(例如渲染到您的自定义 UI 中)
If I'm not mistaken, expo-image-picker just pulls up the native system UI that handles image picking, just like the modal that shows up when you change an appleID profile picture in settings.如果我没记错的话,expo-image-picker 只是调出处理图像选取的本机系统 UI,就像您在设置中更改 appleID 个人资料图片时显示的模态一样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.