Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to save the image on iPhone, in the gallery? [closed]

how to save the image on iPhone, in the gallery, in applications such as "wallpaper " ?

Hi :) i create app with wallpapers :) but i dont know how to save my images in gallery :( Help me please

like image 733
Родион Рябушин Avatar asked Sep 26 '12 19:09

Родион Рябушин


People also ask

How do I save a picture to my iPhone gallery?

On the iPhone, it's located in the lower-left corner. On the Share list that pops up, tap “Save Image” or “Save Video.” If you selected multiple items, tap “Save X Items,” where X is the number of items you've selected.

Why are my pictures not saving to my gallery iPhone?

Method 1: Check your iPhone storage If there is not enough space for new files, iPhone not saving photos to camera roll will definitely appear. You can try to free up space on iPhone by deleting useless apps, delete photos, music, notes, videos, and messages. Go to "Settings" > "General" > "iPhone Storage".


1 Answers

To save an image you can use this line of code:

    UIImage *image = [UIImage imageNamed:"someImage.png"];
    UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);

There are also ways to check when the image is done saving, the full documentation can be found here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html

On newer iOS versions, it is required by Apple that in your info.plist you add a usage descriptor for the key Privacy - Photo Library Additions Usage Description. (NSPhotoLibraryAddUsageDescription)

like image 197
shabbirv Avatar answered Oct 25 '22 13:10

shabbirv