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

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

Related

iOS Image Viewer like Photo app

I am developing an app that has an internal gallery with some images.
What I want to achieve is exactly a result that behaves and looks like the Apple Photo app image viewer.
With a collection view I implemented the gallery images with thumbnails and now I would like to show the image on fullscreen on press.
The image viewer should have exactly the Apple's Photo behavior:
Full screen on single tap,
Delete, Share button etc...
Pinch to zoom, double tap zoom...
My question is. Is that really possible that such a common feature is not already given by iOS? Is there maybe a view controller already build in that we can use but I am not aware of?
I know there are some libraries around that make such thing, but I'm wondering if there's already something given.

UIImagePickerController with Custom Overlay and Edit Image

I am taking picture using UIImagePickerController with custom overlay view. I have a requirement to enable native editing mode of UIImagePickerController when photo is taken and user taps "Edit" button which is on my custom overlay view.
I have set:
imagePickerController.showsCameraControls = NO;
How is this possible to achieve?
Thanks,
You might be trying using UIImagePickerController. But I know this one solution to your problem. You can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In simple words what it does is when you click to open the camera, it calls the classes and methods which are responsible for opening the iPhone's camera and record video or capture audio. It calls the same classes which are called by UIImagePickerController. So your camera will open and start taking input.
Now, if you open the xib file of that AVCam project, you'll find a small UIView object. This view is responsible for displaying the camera's feed. You can resize that view as per the size you want and the camera's input will be displayed in that much area. You can also put the frame image around it as per your choice.
It worked for me when I wanted to resize the camera's input feed and capture photos. I hope it works for you as well.

need custom LibraryPicker with initial image on custom cameraOverlay UIImagePickerController iOS8

I'm wondering how I can add the default Library picker button that can be found on an iPhone's default Camera app(can also be accessed via dashboard). The button looks like this, though this is an app custom implementation:
So I know that it can be done, but how? It's the library image picker that you can see the taxi car in. I'm using a completely customized UIImagePickerController through the use of the imagePickerController's property customOverlay view and I need to add this very same button to my overlayView. If someone could guide me towards a solution that'd be of great help, thanks!
I can imagine using UIImagePickerControllerSourceTypePhotoLibrary for the button and simply setting the button's imageView property to the first picture in the camera roll, but how would I go about doing this?
Also, is this somehow controllable by iOS default UIImagePickerController

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

Collection view selection like photo library

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.

Resources