I want to pick an image from the gallery and show the preview for a user asking him/her to cancel/chose the image.
I can achieve this using the allowsEditing option but I want to hide the square crop that is displayed to the user, instead I just want to show the selected image in a separate view and give him an option to cancel or chose the selected image.
You cannot disable the 'crop' option if you are allowing the editing for the media but one thing that you do is to get the original image even if the user crops a selected image.
See below Apple mentioned in the documentation.
https://developer.apple.com/documentation/uikit/uiimagepickercontroller/infokey
Use the infoKey and get the originalImage instead of the cropped.
Related
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.
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).
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.
I am writing an iPhone app. My next step is to create a card object. I know how to do this theoretically, but my problem is coming from my lack of experience in Xcode.
This is my add item page
I want the user to specify a name and then choose an icon, either from the 3 most popular choices, another page of premade options, or take their own picture and use that.
Now, how do I show those choices in a way that the user can select one and I can collect their response? Right now, they are simply buttons, I can add my background image to them, but I don't know how to record their response. I would like it to show them their selection by adding that shadow around the box.
I'm not sure if a button is the best approach.
Also, I will need the same selection behavior for the image they take themselves, but I figure if I get the icon choices to work, I can figure out using a picture taken by the user.
Thanks for any help.
I would create button "Select image" below the uiimageview.
This button would present action sheet where you would have two options
a) select form existing
b) take a picture.
Then I would probably use Grid view to present the existing icons and UIImagePicker for taking pictures :)
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)...