我正在使用RNCamera,它的工作非常好(下面是我的功能)。我可以拍摄图像并将其保存到照片库中。虽然有人对如何保存到IOS上的特定专辑有见识?我见过针对Android的解决方案,该方法也没有任何选择。不知道如何解决这个问题。 TIA。我在想可能需要编辑uri?似乎不对,只是寻找想法。可能需要修改node_modules / react_native / Libraries / CameraRoll中的库文件“ CameraRoll.js”?
-阅读react-native文档https://facebook.github.io/react-native/docs/cameraroll.html
-搜索stackoverflow(使用android解决方案找到线程)/ google
async takePicture() {
if (this.camera) {
const options = { quality: 0.5, based64: true }
const data = await
this.camera.takePictureAsync(options).then(data =>
console.log(data.uri))
CameraRoll.saveToCameraRoll(data.uri, 'photo'));
}
};