I'm using the UIImagePickerController to choose an image, and display it to the user immediately. However, I want the user to be able to swipe, and the next image from the album appears. The question is, how do I access the next image in the album after the initial user-selected image, programmatically?
With UIImagePickerController you just can't.
You need to use the ALAssets Library for that.
See this example: Accessing photo library using assets library
Best,
Christian
Related
How do I use the uiimagepickercontroller to let the user pick multiple images at once? Also how would I display a checkmark next to the preview images as the user selects them?
This photo I found online illustrates what I would like to do:
You can't do that with the UIImagePickerController. You could replicate the functionality of the UIImagePickerController though. Check out this project.
While using uiimagepicker, is there any way of specifying which user created album the images should be picked from?Ill explain.Suppose there are two albums created by the user in the ipad.Let them be named 'friends' and 'students'.Is there any way of specifying which one of these albums the photos should be accessed from ?or How can i know the name of the album the picked image belongs to?
can it be done via alsset methods?What i want to do is access photos from a particular synched album using their names.Is it even possible.I mean does iphone use its own naming conventions or are the original image names retained?
You should use ALAssetsLibrary and make your own custom picker. You can find a custom image picker using ALAssetsLibrary at https://github.com/B-Sides/ELCImagePickerController
When the user selects an image from the custom picker, you are returned with the ALAsset object from which you can get the required image, album it belongs to etc. You can save that and modify the custom picker to navigate to a selected album.
If you want to present a media browser to the user (so that he/she can pick an image), I think you can only choose to present the entire photo library or the Camera Roll album (or Saved Photos album, if the device hasn't a camera).
http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/PickinganItemfromthePhotoLibrary.html#//apple_ref/doc/uid/TP40010408-SW1
EDIT
I've found
here, on github an open source UIImagePickerController clone by Jeena. Maybe, it should be useful for you.
I am not sure but pls take a look at ALAssetsLibrary
Give the path for specific album and get the images.
hello
in the folder: /Users/username/Library/Application Support/iPhone Simulator/4.3/Applications you can find your images that are saved.
when you save the path you maybe can substract the name of the folder.
grtz
I am working on one application in which i need to show slide show of the user selected photo album,
UIImagePickerController only returns the selected image. I want all previous and next images of the selected image, is it possible with UIImagePickerController and if not is there any other way that i can do it.
Thanks in advance,
Satish
You'll have to create a custom picker to select an album instead of an image. You'll want to use ALAssetLibrary to get a list of albums via enumerateGroupsWithTypes:usingBlock:failureBlock and then on the group call enumerateAssetsUsingBlock: to get the individual images.
I want to make a gallery with previous and next button in my iPhone app.
If anyone has idea , link , exampler or something that lead me to implement the gallery please provide me .
I've written a simple and easy to use photo browser called MWPhotoBrowser. I decided to create it as Three20, while very good, was too heavy/bloated as all I needed was a photo viewer.
It is an implementation of a photo viewer that I wrote allowing the user to view one or more images in a similar way to the native Photos app. It can display one or more images by providing either UIImage objects, file paths to images on the device, or URLs images online. Photos can also be zoomed, panned, and navigated with previous/next buttons.
View MWPhotoBrowser on GitHub
Hope this helps!
Thee20 framework, they have a great gallery example
I have to create a photo gallery app in iPhone. It should function same as the Photos app which is shipped with iPhone. But it should show the images which I package with the app.
UIImagePickerController reads only the following source types.
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,
UIImagePickerControllerSourceTypeSavedPhotosAlbum
I was thinking of adding the images bundle to the resources group in Xcode and make UIImagePickerController to read them and display.
Looking at the class references I found UIImagePickerController reads only from the resources mentioned above. Which means it can only pick the images from camera roll OR saved photo gallery OR allow user to take a pic and use it.
Does anybody know how to make UIImagePickerController read from custom source type or images?
OR
How to create a photo gallery app in iPhone :-)
Thanks,
AJ
I don't believe it is possible to make the UIImagePicker pick images from your own source. You will have to write the picker yourself (which, performance aside, doesn't seem to hard... Just a couple of UIImageViews in a UIScrollView).
Just today I started a open source UIImagePickerController clone, it is not perfect but it works quite ok. Feel free to fork http://github.com/jeena/JPImagePickerController