Collection view selection like photo library - ios

I have created a UIActionSheet that can display to the user, "Choose Existing Photo" and "Take Photo"
They work just fine. However, instead of choosing an existing photo from the user's library, I want to have them select a premade icon set that I will provide in a UICollectionViewController.
When doing the camera roll, it's as easy as using the line
mediaPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
where mediaPicker is a UIImagePickerController.
I'm sure what I am trying to do is close to the same lines. I have a UICollectionViewController with the icons displayed there, and I want the user to choose one of those so, the exact same functionality of the choosing from photo library.
Any ideas?
Thanks

You need to customize your own UIImagePickerController.
Some people created classes for that.
You can find one example here and another here.

Related

Swift: how to change default behaviour of buttons "Use Photo", "Cancel", "Shoot", "Retake" of UIImagePickerController

As explained here I would need to modify a little the actions/behaviour of the buttons listed in titled. I would like to avoid to build a new image picker overlay as some posts suggest. I just need to add a call to one of my methods into default actions. Isn't there a simple way to do this?
You can't.
As explained in the UIImagePickerController class reference:
The UIImagePickerController class manages customizable,
system-supplied user interfaces for taking pictures and movies on
supported devices, and for choosing saved images and movies for use in
your app. An image picker controller manages user interactions and
delivers the results of those interactions to a delegate object.
And then:
To perform fully-customized image or movie capture, instead use the AV
Foundation framework as described in Media Capture and Access to
Camera.

How to open Saved Photos Album when touch a button? [duplicate]

I am trying to write an app which involves picking a picture from either camera or library. Once the picture is picked , I want to show the preview of the picture.It happens by default when camera is opted. Once the photo is clicked, it shows the user to choose or retake. But I want the same to be done when the picture is selected from the photo library also. Can this be done??
Ok thanks for the response. Here is what I did:
Subclass UIImagePickerController . Upon picking an image, I am pushing another viewcontroller which is similiar to preview screen. This is similiar to facebook app and so I think it will get approved by apple.
I may be wrong, but I think you need to implement the custom view yourself. You can use the delegate callback method to get the selected image and put it on your custom view along with buttons (choose or retake).

UiImagePicker custom part

in my app and I'm using UiImagePicker also implemented UiNavigationControllerDelegate for some customizations as the delete key and the back button.
When the user browses the images from its library and chooses one, if you AllowEditing is enabled, the image picker shows a screen for cropping the photo ..
At the bottom of this view seems to be a TabBar controller with two buttons:
Choose Cancel and
I wanted to know if anyone knows how to change the text of these buttons ...
Can you help?
There is no supported API that gives you the ability to customize those buttons.
Perhaps the best solution is to find a custom replacement for UIImagePickerController. There may be one on github or Google code.

iPad Photo Gallery Framework

I am looking for some framework that allows me to create a Photo Gallery that allows the user to swipe through pictures, and then select one and it takes them to a specific view based on that image. I seen this idea in another App, and didnt know if this was an open source framework, or if there is anything similar.
I wrote a library that should be able to handle this:
https://github.com/nicklockwood/iCarousel
Check out the "custom" or "time machine" carousels in the example app for something similar to what you've shown.
Here's a screenshot. Don't worry that it's not exactly the same as your picture; the angle, panel size, etc. can all be configured.

How to show the 'preview' screen after picking a photo using UIImagePickerController

In my project, i am using UIImagePickerController to allow the user to pick a photo from the iDevice gallery (that is from the saved images, NOT camera)
I would like to present the preview screen as done when picking an image in the native messages app (it has 'cancel/choose button at the bottom)
I tried setting the allowEditing to YES, but the result is 'Move and Scale' which i dont want.
Is there a way to do it, or do i need to create this 'preview' view in my app?
Sorry for the bad news, but the Move and Scale is a view you'll have when setting allowEditing to YES. If you want something else, you'll have to built it by yourself (or to find some open source for it)...

Resources