iOS didFinishPickingMediaWithInfo camera roll order newest Images at top - ios

A quick question how do you reverse the order that the camera roll is shown i.e newest images at the top rather than having to scroll all the way to the bottom to get newest image? Alas Facebook image picker?

This works for me in the sense that its just one extra step to select album then images are presented latest first UIImagePickerControllerSourceTypePhotoLibrary rather than UIImagePickerControllerSourceTypeSavedPhotosAlbum

There is one more solution to this
-Using AssetsLibrary frmaework you can have the view completely customised as per your requirement.
Reference :
UIImagepickercontroller: is it possible to change the sort order of the images in camera roll?

Related

Loading Images into native UIImagePickerController allowsEditing

I am trying to do the following:
I've got images, that I get from Facebook directly. Since they are not formatted in the right ratio (square). I want the user to crop it themselves right after getting them.
My Idea: Adding the image to the allowsEditing View from the native UIImagePickerController.
Is this possible?
It's not possible to open native crop. You can only open UIImagePickerController, with allowsEditing = YES and select imaged from local library.
You can use this library to solve your problem:
https://github.com/TimOliver/TOCropViewController

Multiple Selection Of Image in iOS

hey I'm new in iOS app developing world...
I had open the gallery and selected only one image and displayed on image view.
Now I want to select multiple image from Gallery.
So my question is
How should I select multiple image from Gallery in iOS and display on UIImageView???
UIImagePickerController doesn't support multiple selection by default, but you can use libraries like QBImagePicker to achieve that.
Generally you should not pick multiple images from iOS native picker so
from UIImagePickerController you can get only one picture. If you need to pick more you need a custom image picker, such as ELCImagePickerController. It works well! You can download it here.

Set image to the image view from Gallery without select the image from the Image Gallery

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.
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
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

Creating my own Image Picker

I'd like to create a custom image browser in my app that uses the images from the camera roll.
i.e. I'd like to completely replace UIImagePickerController and use my own control.
Is there a way of accessing the camera roll photos in this way?
Cluster App does this but I can't find a picture of it.
You need to use ALAssetsLibrary to access the images.
Have a look at the QBImagePickerController on the GitHub. They implemented custom image picker controller very similar to UIImagePickerController with added multiple selection feature. It will help you. Atleast look at this file
Check out RengarViewController
a custom image picker controller which make use of Photo Framework (introduced in iOS 8).
It has nice UI, can be scrolled and panned.

how to integrate photos library

I want to add iphone-style photo library in my app.
It is like when you open Photos on iphone it shows your album lists.You can click one row and all photos are shown. Touching one, you can see the detail information of the photo and you also can scroll and zoom in/out.
Now I use UIImagePickerController, and I met problem after I selected one image. I don't know how to scroll the image and zoom in/out using apple's API.
If there is no api to do this, I'd like to know how to do it.I can know the original image in
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
But if you want to scroll you should know all the photos in advance, and it seems UIImagePickerController doesn't provide the interface.
Can any one give tips?
thanks!
I mean after selecting one image it just like what you do in iphone's Photos, you can zoom in/out and scroll to the previous or next photo. Sorry for my ambiguous.
You need to allow the user to edit the photo.
To do that, enable the flag allowsEditing on your UIImagePickerController.
UPDATE BASED ON COMMENT:
To create this functionality of browsing the photos on a carousel mode you will need to implement your own custom component. You will need to get access to the photos and then build the functionality yourself.
In order to be able to swipe through images in your library, you would have to use the ALAssetLibrary or Photos Framework (iOS 8 only) to build a custom image picker.
Here's how it should work.
Use either one of these libraries to fetch the photos in the camera roll.
Display the thumbnails of images in a UICollectionViewController.
Display the selected image
in a UIPageViewController. The data source would be the array of images that you have fetched earlier.

Resources