How can we display the UiImagepicker controller interface with both camera and video mode, as it is in the default camera application on iPhone.
UIImagePickerController has a mediaTypes property, which is an array of types you want to support (image, video, or both):
http://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/occ/instp/UIImagePickerController/mediaTypes
The way it has it within the OS is that it changes the picker via a slider in the bottom toolbar.
When the value changes from photo to video via the slider, you could recreate the UIImagePickerController with the appropriate mediaType and reload the view.
I do not know if this would be as seemless as the iPhone included way of doing things without testing it, however, this would allow you to change the picker being used from one to the other.
Related
The iPhone camera toolbar holds the following buttons: cancel/record
I would like to change the cancel button to the small image button that takes me to the photo library.
I wasn't sure if i need to use the overlay or does the xcode have something more comfortable in this case since this is something well known and used.
Is there something like this?
Thanks,
You can set overlayView to your UIImagePickerController
imagePicker.cameraOverlayView = yourOverlayView;
UIImagePickerController Class Reference
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.
I would have though that the UIImagePickerController would allow you to use the camera or choose from the library from within the view? It seems I have to pick one or the other cia the sourceType? Is there no way to add a button to the choose library view to switch to camera?
You would have to implement this yourself. You can make a simple UISegmentedControl and when the value is changed, you change the source of the UIImagePickerController.
Is there an interface for allowing user tap once and be able to pick an image from the library OR the camera at the same time? I know there is way to have two buttons. I want to limit it to one button and not use an actionsheet and allow the user to switch between library and the camera while they are in the imagepicker UI. So, is there a way to set this both value? Thanks.
UIImagePickerControllerSourceTypeCamera
UIImagePickerControllerSourceTypePhotoLibrary
I have a video that needs to be activated when scanning a qr-code. When starting a video needs to be shown full-screen and without controls (volume and other buttons). Is there a code for this? Also is it possible to disable all functions of the iphone, so the user needs to view the full video? I would be so greatfull f somebody would answer me..
You can set the controlStyle property of an MPMoviePlayerController to MPMovieControlStyleNone. You'll have a fullscreen movie with no controls. Just remember to set the delegate so you can dismiss the video when it finishes playing.
I'm trying to make an augmented reality application with a waypoint structure, like Yelp, and I'm wondering how to set up my main view so that it displays the camera view on the whole screen. I've heard of using the UIImagePickerController Class, but I'm unsure how to manipulate the code so that it doesn't actually take a picture, but just stays in the view mode. Any help would be appreciated, thanks!
From the documentation:
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html
You should just be able to create a UIImagePickerController and set sourceType to UIImagePickerControllerSourceTypeCamera, and then disable the camera controls using showsCameraControls.