作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
可以使用相机胶卷获取照片,但通过智能相册过滤,例如:自拍、屏幕截图等..?我尝试这样做:
CameraRoll.getPhotos({ groupName: 'Favorites', groupTypes: 'Library', first: 36 })
.then((data) => {
const assets = data.edges;
const images = assets.map((asset) => {
console.log('Imagen', asset);
return asset.node.group_name;
});
console.log('CameraRoll images', data, images);
})
.catch(err => console.log('CameraRoll error', err));
但始终返回一个空数组。
最佳答案
这是不可能的,因为react-native使用ALAssetsLibrary,而我需要使用Photos框架,所以解决方案是集成react-native-photos-framework
关于reactjs - CameraRoll react native smartAlbum,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43551157/
我正在获取用户库中存在的所有 smartAlbum。我使用的代码是这样的: var smartAlbums: PHFetchResult! override func viewDidLoad() {
可以使用相机胶卷获取照片,但通过智能相册过滤,例如:自拍、屏幕截图等..?我尝试这样做: CameraRoll.getPhotos({ groupName: 'Favorites', groupTyp
我是一名优秀的程序员,十分优秀!