0

I am new to IOS app development. I have one problem. I have to get an image from the Image Gallery of the iPhone without letting the user select the image. I need to programatically set the image name of the image I need to get the Image. Any one please help me.

2 Answers2

0

Unfortunately what you'd like to do is not allowed on iOS.

You have to use UIImagePickerController, ask permission from the user, and let the user choose an image.

Check this thread: Access Photo Library via Objective-C/Xcode in iOS

Community
  • 1
  • 1
bzatrok
  • 35
  • 1
  • 1
  • 5
0

You can fetch images from Gallery programmatically using AssetLibrary.

These can be helpful Tutorial1 and Tutorial2

This stackoverflow answer could also be helpful

Once the images are fetch you can select and then set it to any UIImageView

Community
  • 1
  • 1
Usama
  • 1,945
  • 1
  • 13
  • 20