Maybe this is the wrong place for this (if so, please help guide me where I should ask this). Would it be possible (or even an acceptable iOS practice) to customize:
The screen that shows when a user takes a photo.
The screen that shows when a user accesses their photo library.
Thanks in advance!
Both these screens are provided by the UIImagePickerController class. You can handily customize the screen to take a photo - there's even API for it. You would first set showsCameraControls to NO to prevent the controller from drawing its own controls, then set a value for the cameraOverlayView property to insert your own controls over the camera. Take a look at the UIImagePickerController docs for more.
By contrast, you should not customize the photo library picker - that's a more traditional navigation interface, and Apple hasn't exposed any extra API to customize how it appears. You could (of course) always start poking into the view hierarchy of the controller once it's onscreen, but I think that would be a little more startling to your users than customizing the camera, and is more prone to break if Apple changes the guts of UIImagePickerController.
Related
I would like to display a UIImagePickerController with the allowsEditing property set to true, since that gives you a nice view of the photo that you took with the ability to "Retake" or "Use Photo".
However, I don't want the user to be able to crop the image, so it makes sense to somehow hide that square overlay in that view.
I'm attaching a screenshot for clarification.
UIImagePickerController is a simple-minded lazy way to supply an image-capturing interface. If you adopt it, you must simply accept that. Either you buy into UIImagePickerController for capturing an image or you don’t. If you do, you must accept its limitations.
You can turn off allowsEditing and roll your own interface by removing the default controls and supplying new ones, and you can even push your own secondary interface onto the picker controller (because it is a navigation controller); but you cannot turn on allowsEditing and then struggle against the interface that it gives you.
On the other hand, if you’re willing to do a little work — that is, if you don’t buy into UIImagePickerController — then you simply use AVFoundation to take the photo and build your own interface completely from scratch. Now you can have any interface you like.
Could anybody tell me how I can develop the feature like deposit checks feature in Wells Fargo bank iOS app ? To implement it, should I customize the default UIImagePickerController or AVCaptureSession or something else? the camera function I want looks like the attached screenshot : Wells Fargo iOS app - deposit check
I don't need the image processing function ,just want to know how to customize the camera view like this.
It depends on the functionality you need.
You can customize the UIImagePickerController interface. In the image capture interface, you can hide the standard controls by setting shows- CameraControls to false, replacing them with your own overlay view, which you supply as the value of the cameraOverlayView. If it is all you need UIPickerImagePickerController might be all you need.
But you should probably consider getting rid of UIImagePickerController altogether and designing your own image capture interface from scratch, based around AV Foundation and AVCaptureSession. You get no help with interface, but you get vastly more detailed control than UIImagePickerController can give you. For example, for stills, you can control focus and exposure directly and independently and so on.
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'd like to avoid the use/retry view after the picture is taken without disabling the default Apple camera controls that let me take the picture.
Doing this:
imagePicker.showsCameraControls = NO;
Causes ALL the camera controls to disappear. Is there any other method?
Unfortunately there is no proper way to do this provided by Apple. So here are you options:
showCameraControls = NO and adding your own controls.
go hardcore and use AVFoundation - but again you'll need your own controls - probably not what you're looking to do but if you're interested I have a sample app of this here:
https://github.com/Shein/CameraFeedUnderlay
Hack around it - place YOUR OWN button on top of camera control play button and override the action to take the picture as you would without camera controls and directly dismiss the UIImagePickerController.
There's a sort-of example of this solution here:
iPhone SDK - How to disable the picture preview in UIImagePickerController?
Perhaps this helps. You can use imagePicker.showsCameraControls = YES; in collaboration with NSNotificationCenter listening to #"_UIImagePickerControllerUserDidCaptureItem" and #"_UIImagePickerControllerUserDidRejectItem".
When entering the #"_UIImagePickerControllerUserDidCaptureItem" state, you could then dismiss the UIImagePickerController.
I had a similar problem, hiding a overlay when entering the preview view. I could solve the problem with this approach.
You can customize an image picker controller to manage user interactions yourself. To do this, provide an overlay view containing the controls you want to display, and use the methods described in “Capturing Still Images or Movies.” You can display your custom overlay view in addition to, or instead of, the default controls. Custom overlay views for the UIImagePickerController class are available in iOS 3.1 and later by way of the cameraOverlayView property. For a code example, see the PhotoPicker sample code project.
from this you can create your own customCameraView to show your own controls that you need to show
I am developing an iPad app that needs to have multiple image sources, on the device/Photo Albums, remote and some included with the app. Now the ideal situation would be to have a UIPopover controller with 3 tabs for each source. The only problem is I can't seem to figure out how to have a UIImagePicker be in its own tab. What I am trying to do is very similar to Apple's Keynote for iPad. The photo icon's popover has tabs and the far left tab called media for sure has a UIImagePicker in there. I have no idea how they did that, is it possible for me to do something like that? I think the main issue is that the Image Picker is it's own navigation controller and it cannot be pushed on to another navigation controller. Any help would be greatly appreciated!
check out this - https://github.com/key1jp/ELCImagePickerController
you can implement it with custom asset library
The built-in image picker is no good.
Create your own image picker and add it to your navigation controller as a normal view. Start from either the Matt Tuzzolo or the MyImagePicker from the WWDC 2010 sample code. Note that you probably want to add image and video preview - I copied the image viewer from MyImagePicker and added a 'add' or 'remove' button to it, and the same for video.
Your image picking is in two steps, one for selecting the group, and one for selecting the assets within the group. I recommend dividing the first step into a two - if there is only one, then go directly to that group, i.e. when you have found the first group, check whether that group was the last (block stop argument). Then push the right view controller.
Obiously modify the size of the thumbnails also, they are iPhone size now. Adding a line of metadata (icon and duration) looks much nicer and is more informative for video.
I also recommend adding a 'click-and-hold' function for extended information after like 2 seconds.
Handle different sources by creating a protocol which gives you what you want, i.e.
-(BOOL)isImageAtIndex:(NSInteger)index;
-(UIImage*)thumbnailForUndex:(NSInteger)index;
-(void)setSelectedAtIndex:(NSInteger)index;
Creating a source which handles local files, included resources and assets is perfectly possible - I use NSURLs and check on the url scheme.
Are you not using UITabBarController for your tabs? You should be able to add a UIImagePickerController directly to viewControllers. I'm not sure whether that is a supported use of the image picker, though; the documentation only mentions displaying it modally or displaying it in a UIPopoverController.
It's not usually useful to look at an Apple app to find out what you can do with various built-in controls, as Apple allows themselves to use private APIs.