gpt4 book ai didi

ios - react native : how to get the names of all the albums

转载 作者:可可西里 更新时间:2023-11-01 04:50:08 25 4
gpt4 key购买 nike

我希望用户选择一个相册,然后以 react-native 显示其中的照片。有 CameraRoll,它可以按 groupName 进行过滤,但我没有找到检索这些 groupName 的方法。有谁知道如何做到这一点,或者我需要编写一个本地插件吗?

最佳答案

好吧,至少你可以选择很多项目和组......

import R from 'ramda';
import { CameraRoll } from 'react-native';
let groupNames;
CameraRoll.getPhotos({
first:20000
}).then(
(result) => {
const groupNamesAr = R.map(
(item) => {
return item.node.group_name;
}
)(result.edges)
groupNames = R.countBy((i)=>i)(groupNamesAr);
}
)

关于ios - react native : how to get the names of all the albums,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39735424/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com