Skip to content

Commit

Permalink
指定 NSArray 的元素类型
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtmelon committed May 1, 2020
1 parent f0aea1b commit db7a487
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion QMUIKit/QMUIComponents/AssetLibrary/QMUIAssetsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extern void QMUISaveVideoAtPathToSavedPhotosAlbumWithAlbumAssetsGroup(NSString *
*
* @return 返回包含所有合适相册的数组
*/
+ (NSArray *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum;
+ (NSArray <PHAssetCollection *> *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum;

/// 获取一个 PHAssetCollection 中创建日期最新的资源
+ (PHAsset *)fetchLatestAssetWithAssetCollection:(PHAssetCollection *)assetCollection;
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/QMUIComponents/AssetLibrary/QMUIAssetsManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ + (PHFetchOptions *)createFetchOptionsWithAlbumContentType:(QMUIAlbumContentType
return fetchOptions;
}

+ (NSArray *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum {
NSMutableArray *tempAlbumsArray = [[NSMutableArray alloc] init];
+ (NSArray <PHAssetCollection *> *)fetchAllAlbumsWithAlbumContentType:(QMUIAlbumContentType)contentType showEmptyAlbum:(BOOL)showEmptyAlbum showSmartAlbum:(BOOL)showSmartAlbum {
NSMutableArray <PHAssetCollection *> *tempAlbumsArray = [[NSMutableArray alloc] init];

// 创建一个 PHFetchOptions,用于创建 QMUIAssetsGroup 对资源的排序和类型进行控制
PHFetchOptions *fetchOptions = [PHPhotoLibrary createFetchOptionsWithAlbumContentType:contentType];
Expand Down

0 comments on commit db7a487

Please sign in to comment.