替换代码形式过滤器 “allPhotos” 在两个地 “allAssets” 在 ELCAlbumPickerController.m类
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
// replace [g setAssetsFilter:[ALAssetsFilter allPhotos]]; as it filter only photo
[g setAssetsFilter:[ALAssetsFilter allAssets]]; //gives allassets
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// replace [picker.assetGroup setAssetsFilter:[ALAssetsFilter allPhotos]]; as it filer only photo
**[picker.assetGroup setAssetsFilter:[ALAssetsFilter allAsset]];** // gives allassets
}
现在所有资产会显示在库中。为了区分视频和图像缩略图,您现在必须在构造中添加一些代码ELCAsset.m类r
-(id)initWithAsset:(ALAsset*)asset_ {
if ([self.asset valueForProperty:ALAssetPropertyType] == ALAssetTypeVideo){
// code for video thumbnail
// you can use this link to understand video thumbnail
//http://stackoverflow.com/questions/11688938/alasset-thumbnail-at-specific-timestamp
}
if ([self.asset valueForProperty:ALAssetPropertyType] == ALAssetTypePhoto){
// code for Photo thumbnail
}
}
ok thx ..如果你有任何链接,你可以分享我的视频图标和时间缩略图图标底部 –