Created
April 25, 2020 16:00
-
-
Save Zedd0202/8543aa16009a47886a135124c6514b8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let albums = PHAssetCollection.fetchAssetCollections(with: .smartAlbum, subtype: .any, options: nil) // system 앨범 | |
let albums2 = PHAssetCollection.fetchAssetCollections(with: .album, subtype: .any, options: nil) // 사용자가 만든? 앨범 | |
albums.enumerateObjects { (collection, _, _) in | |
let title = collection.localizedTitle | |
let count = PHAsset.fetchAssets(in: collection, options: nil).count | |
print(title, count) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment