iOS会在应用程式专属相簿中储存相片 [英] iOS save photo in an app specific album
本文介绍了iOS会在应用程式专属相簿中储存相片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个iOS 5应用。
I'm creating an iOS 5 app. I want to save a photo to the device.
我要将照片保存到特定于我的应用程序的相册,所以我需要创建相册,然后保存
I want to save the photo to an album specific to my app, so I need to create the album, and then save photos to the album.
我知道如何创建相册:
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library addAssetsGroupAlbumWithName:@"MY APP NAME" resultBlock:^(ALAssetsGroup *group) {
//How to get the album URL?
} failureBlock:^(NSError *error) {
//Handle the error
}];
我要为新相册添加照片,我该怎么办?非常感谢您的示例代码。
I want add photos to the new album now, how do I do so? Sample code is greatly appreciated!
推荐答案
本文似乎是用自定义 ALAssetsLibrary
类别。看起来在文章下方有一些有用的评论可能有助于表演。
This article seems to achieve what you're looking for with a custom ALAssetsLibrary
category. Looks like there are some useful comments below the article that may assist with performance also.
这篇关于iOS会在应用程式专属相簿中储存相片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文