問題描述
如何獲取 iOS 中所有相冊的列表?我知道圖像選擇器必須在某處列出它們,因?yàn)樗鼘⑺鼈內(nèi)匡@示給用戶.擁有相冊后,我將如何顯示特定相冊中所有圖像的縮略圖?我似乎在文檔中找不到任何內(nèi)容,但我確信一定有辦法做到這一點(diǎn).
How do I get a list of all the photo albums in iOS? I know the image picker has to have a list of them somewhere since it displays them all to the user. Once I have the photo albums, how would I go about displaying thumbnails of all the images in a particular album? I can't seem to find anything in the docs, but I'm sure there's got to be a way to do it.
推薦答案
如果這是您所要求的,您無法從 UIImagePickerController
獲取此類信息.
You can't get that kind of information from UIImagePickerController
if that is what you are asking.
看看 AssetsLibrary 框架.甚至還有示例代碼 實(shí)現(xiàn)自定義圖像選擇器.
Take a look at AssetsLibrary framework. There is even sample code that implements a custom image picker.
這篇關(guān)于獲取所有相冊的列表和每個(gè)相冊的縮略圖的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!