简体   繁体   English

如何将图像仅保存在iPhone相册中的自定义相册?

[英]How to save images only custom album in iphone photlibrary?

I have one doubt, Is it possible to save the image only on custom album not in savedphotosalbum in iPhone photolibrary. 我有一个疑问,是否可以仅将图像保存在自定义相册中,而不能保存在iPhone摄影库中的savedphotosalbum中。 Because this guy told every image must be stored on camera roll or saved photos album default. 因为这个家伙告诉每个图像必须存储在相机胶卷上或默认保存的相册。 That link is below, 该链接在下面,

Saving image to custom album only 仅将图像保存到自定义相册

Guys can you give some suggestion or new idea to store the image only custom album name. 伙计们,您可以提出一些建议或新想法以仅将图像存储为自定义相册名称。

If any one give I really appreciate to you. 如果有人给我,我真的很感谢您。

As far as I know this isn't possible, all images appear both in the camera roll and in the album you save them to. 据我所知这是不可能的,所有图像都会同时出现在相机胶卷和保存到的相册中。 If you still insist on the images not appearing in the camera roll you can create and manage your own gallery within the app (using Core Data for instance). 如果您仍然坚持图像不会出现在相机胶卷中,则可以在应用程序中创建和管理自己的图库(例如,使用Core Data )。 I really wouldn't recommend this as there's a lot of overhead in maintaining such a gallery (speaking from experience). 我真的不建议这样做,因为维护这样一个画廊会有很多开销(从经验上讲)。

try this: 尝试这个:

    ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];

    [library saveImage:image toAlbum:@"Your Album" withCompletionBlock:^(NSError *error) {
            if (error!=nil) {
                NSLog(@"Big error: %@", [error description]);
            }
        }];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM