Can ImagePickerController have the previewView when picked photo done? - ios

I have a view controller with UIImagePickerControllerDelegate and UINavigationControllerDelegate to pick photo.
I also want to make the same preview view when I picked photo done like the preview view when I taken photo done.
Have any suggestion? Thx!

You can get the UIImagePickerController to show the preview screen when choosing a photo if you set picker.allowsEditing to true. Be aware though that this will allow users to crop and reposition their photo in both the photo library and camera source types.

Related

Can i open UIImagePickerController with it's previous position were photo is selected?

For example. I am presenting UIImagePickerController and store it's strong reference.
Now there is list of A,B and C album.
From album B i select one photo and dismiss UIImagePickerController.
Now while i re-open UIImagePickerController from strong reference for picking photo i am getting album list of (A,B and C) so is there any way to show directly album B's photos ?
Sorry there is no way to do this with an UIImagePickerController. If you want something like that you need to create your own version.
UIImagePickerController just open your photos from Gallery. You cannot make default selection for a photo. You can use my library for it.

How to add image picker with camera button to iOS app

I'm adding a button that opens a view of the saved images on device, but also has a button to open the camera. The iOS Facebook app currently does this.
I've played with both AVCapture to create my own camera ui and UIImagePickerController to use the default UI but have been unable to find a view that displays both the saved images and camera button.
My question is, did facebook implement their own image picker or is it an Apple included library?
Thanks!
Facebook has their own imagepicker subclass but that doesnt matter for you - just implement a different method for each button that changes the imagepickertype to UIImagePickerControllerSourceTypeCamera or UIImagePickerControllerSourceTypeSavedPhotosAlbum and then displays the picker.
This came across this control AQPhotoPicker. Hopefully it will help you, it's easy to use

How to check when UIImagePickerController changes type of camera?

I have an UIImagePickerController and want to know, when a user changes from the back to front camera (and back)?
Is it possible to get this information?
As second part.
After taking a picture UIImagePickerController shows a preview with (Retake and Use Photo Buttons). Is it possible to detect when this view is shown?
You can write your own camera overlay view to have total control over the camera switching and preview behavior. Without a custom camera overlay view, I think you're limited to just receiving the user's final choice in the UIImagePickerControllerDelegate callback.

IOS Image Preview Before Using Camera Roll Photo

I have a UIImagePickerController that is used to upload images to a database. It loads photos from two sources, the camera and the camera roll. When I load the photo from the camera it allows me to take a photo and select if I want to retake the photo or use it. When I load the photos from the camera roll I can select what photo library I want to use but only get a tiled preview of all photos in the library. When I click on the tiled photo preview it gets loaded to the database automatically with no full preview. How can I make it so that when I load a photo from the camera roll it allows me to preview the image before using it in a similar fashion to how it loads from the camera? Here is the coe that I use to specify the UIImagePickerController type, data source and initial settings.
UIImagePickerController *imgPicker = [[UIImagePickerController alloc] init];
imgPicker.delegate = self;
imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:imgPicker animated:YES completion:nil];
You have two options:
You can use the allowsEditing property, set it to YES and the final step will be a “preview” of the picked photo. Of course the user can move and scale the photo from that preview, so maybe this is not what you want.
Code your own preview. It will be a simple view controller that you will push into the UIImagePickerController when the user chooses a photo from the gallery. The simplest solution will be just an UIImageView covering all the screen, and two buttons in the navigation bar to choose another photo or choose the previewed one.
Hey thanks for all the help! I ended up using the third party libraries described here: https://github.com/gekitz/GKImagePicker. The GKImagePicker libraries allow you to easily define an editable and scalable area in the same manner as the allowsEditing does.

Is it possible to re-present the camera after taking a picture and selecting "Use" with ImagePickerController?

After taking a picture using the ImagePickerController and selecting "Use", I want the camera screen to appear again to continue taking more shots, how do I achieve this so I can keep taking shots without stopping? I am not using AVFoundation but ImagePickerController.
If you set showsCameraControls of your UIImagePickerController to NO and provide your own camera controls you can take multiple pictures after each other and dismiss the interface when you see fit.

Resources