Questions tagged [photolibrary]
176 questions
51
votes
8 answers
iPhone: How do I get the file path of an image saved with UIImageWriteToSavedPhotosAlbum()?
I'm saving a merged image to the iPhone photo library using:
UIImageWriteToSavedPhotosAlbum(viewImage, self, @selector(savedPhotoImage:didFinishSavingWithError:contextInfo:), nil);
And getting the callback using:
- (void)…

Ben
- 1,565
- 1
- 10
- 11
34
votes
5 answers
Swift - how to get last taken 3 photos from photo library?
I need to get and show last taken 3 photos from photo library on viewDidload event without any clicks.
After this step, I should get other photos 3 by 3 when I scroll the ScrollView.
Do you know the proper way to do this with swift? Thanks.

fatihyildizhan
- 8,614
- 7
- 64
- 88
19
votes
3 answers
Get all of the pictures from an iPhone photoLibrary in an array using AssetsLibrary framework?
I want to get all of the pictures from photoLibrary. I would prefer a method or example that I can use directly.
user1396086
16
votes
2 answers
Fetch only photos of type PHAssetMediaTypeImage form asset collection type PHAssetCollectionTypeSmartAlbum
I am using the Photos framework to fetch album list in iOS8. I am able to do it using
PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular…

bhoomi
- 373
- 1
- 4
- 11
15
votes
4 answers
Get file size of PHAsset without loading in the resource?
Is there a way to get the file size on disk of a PHAsset without doing requestImageDataForAsset or converting it to ALAsset? I am loading in previews of a user's photo library - potentially many thousands of them - and it's imperative to my app that…

Ryan Daulton
- 1,159
- 1
- 11
- 22
14
votes
2 answers
App crashes when trying to obtain photos from photo library via Image picker
Anyone encountered this error before when trying to access the photo library using the image picker?
NSInvalidArgumentException Cannot set metadata in read-only store.
Any advise on what actually went wrong and suggestions on how I can resolve…

Zhen
- 12,361
- 38
- 122
- 199
11
votes
3 answers
Delete a photo from the user's photo library?
Is there a way I can delete an image that is loaded into my app from a UIImagePickerController?
I want to be able to delete the image from the user's photo library when the user performs a specific action.
I am prompting the user to choose a image…

Jacob Relkin
- 161,348
- 33
- 346
- 320
8
votes
1 answer
iphone, when saving image with "renderInContext" to device, the image is blurry?
I'm using this code to render an image from view.
Then i am saving it to photo album.
The image is blurry?
Why? Is there a solution?
UIGraphicsBeginImageContext(self.view.bounds.size);
[self.view.layer…

Shay
- 2,595
- 3
- 25
- 35
7
votes
4 answers
Save image in UIImageView to iPad Photos Library
I am creating an iPad app that has several pictures (UIImageViews) in a horizontal scrollview. I want to allow the user to be able to save the images to their Photo Library when they tap on one of the UIImageViews. I like the way Safari handles this…

Brian
- 819
- 4
- 20
- 35
7
votes
6 answers
Using PhoneGap, How to get base64 image data of the photo chosen from photo library in iPhone
Using PhoneGap(Cordova), Am trying to get base64 image data of the photo chosen from the photo library.
I could do that.. when the photo is captured from camera, With the below snippet of code in Cordova.
navigator.camera.getPicture(onSuccess,…

Revathy Durairajan
- 494
- 1
- 5
- 15
6
votes
2 answers
uiimagepickercontroller - get the name of the image selected from photo library
I am trying to upload the image from my iPhone/iPod touch to my online repository, I have successfully picked the image from Photo Album but i am facing one problem i want to know the name of the image such as image1.jpg or some thing like that. How…

Priyanka V
- 834
- 2
- 12
- 34
6
votes
6 answers
Swift iOS -UIImagePicker's Photo Library Is Presented On Simulator But Crashes (won't present) On Actual Device While Running Xcode
I'm on Swift 3, iOS 10.3, and Xcode 8.3.3.
When I access the photo library on the simulator the UIImagePicker is presented with no problem and I can pick photos. As soon as I try to access the photo library on an actual device (iPhone 7+) the app…

Lance Samaria
- 17,576
- 18
- 108
- 256
6
votes
2 answers
UIImagePickerController in Storyboard: UIImagePickerControllerSourceTypePhotoLibrary displays black screen
I have a storyboard where I created a UINavigationController instance and set its custom class to UIImagePickerController.
If I set imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera in prepareForSegue, everything works fine.
If I set…

stevesliva
- 5,351
- 1
- 16
- 39
5
votes
2 answers
Accessing the camera and photo library in swift 4
I'm trying to access both the camera and photo library in swift4 using the following code
let imagePickerController = UIImagePickerController()
imagePickerController.delegate = self
let alert = UIAlertController(title: "", message: "",…

Ahmed
- 1,229
- 2
- 20
- 45
5
votes
1 answer
UIImagePicker saves selected images from photo library in tmp folder automatically
I have built an app to take safety questionnaires. The app allows to add a photo to individual questions. I use UIImagePickerController for this. Since iOS 11 I noticed that, both in the simulator as well as iPad, selecting an image from the photo…

MarcI
- 51
- 5