确保筛选有数据
This commit is contained in:
parent
591784a9ec
commit
7b4428e416
Binary file not shown.
@ -337,6 +337,7 @@ class CCSpaceAlbumFilterPopView2: UIView {
|
||||
}
|
||||
|
||||
func loadMoreData(offset:Int) {
|
||||
|
||||
let fetchResult_collection = PHAssetCollection.fetchAssetCollections(with: PHAssetCollectionType.smartAlbum, subtype: PHAssetCollectionSubtype.any, options: nil);
|
||||
//筛选空间相册
|
||||
var spatialAC:PHAssetCollection?
|
||||
@ -359,6 +360,10 @@ class CCSpaceAlbumFilterPopView2: UIView {
|
||||
fetchOptions.predicate = predicate
|
||||
}
|
||||
let fetchResult_asset = PHAsset.fetchAssets(in: sac, options: fetchOptions)
|
||||
guard offset < fetchResult_asset.count else {//确保筛选有数据
|
||||
return
|
||||
}
|
||||
|
||||
var count = 0
|
||||
for i in offset ..< fetchResult_asset.count {
|
||||
let asset = fetchResult_asset.object(at: i)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user