public class UIImagePickerController extends UINavigationController
Modifier and Type | Field and Description |
---|---|
static String |
CropRect
The cropping rectangle that was applied to the initial image.
|
static String |
EditedImage
An image edited by the user.
|
static String |
MediaMetadata
Metadata of a photograph.
|
static String |
MediaType
The media type selected by the user.
|
static String |
MediaURL
The URL of the movie in the filesystem.
|
static String |
OriginalImage
The original image selected by the user.
|
static String |
ReferenceURL
The Assets Library URL of the original version of the picked item.
|
Constructor and Description |
---|
UIImagePickerController()
Creates an object of UIImagePickerController.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsEditing()
Returns a Boolean that shows whether the use is allowed to edit the image
or video.
|
static List<Integer> |
availableCaptureModesForCameraDevice(int UIImagePickerControllerCameraDevice)
Returns a list with available capturing modes for the specified camera of
the device.
|
static List<String> |
availableMediaTypesForSourceType(int UIImagePickerControllerSourceType)
Returns a list with the available media types of the specified source
type.
|
int |
cameraCaptureMode()
Returns the capture mode used by the camera.
|
int |
cameraDevice()
Returns the camera that is used by the image picker controller.
|
int |
cameraFlashMode()
Returns the flash mode of the camera.
|
UIView |
cameraOverlayView()
Returns the view that is displayed above the default image picker
interface.
|
CGAffineTransform |
cameraViewTransform()
Returns the transformation that is applied to the image preview.
|
UIImagePickerControllerDelegate |
delegate()
Returns the delegate of this navigation controller.
|
void |
dismissViewControllerAnimated(boolean flag,
Runnable completion)
Dismisses the view controller for this view controller.
|
static boolean |
isCameraDeviceAvailable(int UIImagePickerControllerCameraDevice)
Returns a Boolean that shows whether the specified camera is available.
|
static boolean |
isFlashAvailableForCameraDevice(int UIImagePickerControllerCameraDevice)
Returns a Boolean that shows whether the enabled camera supports flash.
|
static boolean |
isSourceTypeAvailable(int UIImagePickerControllerSourceType)
Returns a Boolean that shows whether the specified source type is
available.
|
List<String> |
mediaTypes()
Returns the list with the supported media types.
|
void |
setAllowsEditing(boolean allowsEditing)
Set a Boolean that defines whether the use is allowed to edit the image
or video.
|
void |
setCameraCaptureMode(int UIImagePickerControllerCameraCaptureMode)
Sets the capture mode used by the camera.
|
void |
setCameraDevice(int UIImagePickerControllerCameraDevice)
Sets the camera to be used by the image picker controller.
|
void |
setCameraFlashMode(int UIImagePickerControllerCameraFlashMode)
Sets the flash mode according to the specified value.
|
void |
setCameraOverlayView(UIView cameraOverlayView)
Sets the view to be displayed above the default image picker interface.
|
void |
setCameraViewTransform(CGAffineTransform cameraViewTransform)
Sets the transformation to be applied to the image preview.
|
void |
setDelegate(UINavigationControllerDelegate delegate)
Sets the delegate for this image picker controller.
|
void |
setMediaTypes(List<String> mediaTypes)
Sets the list with the media types that the image picker controller
supports.
|
void |
setShowsCameraControls(boolean showsCameraControls)
Sets a Boolean that defines whether the camera displays the default
controls.
|
void |
setSourceType(int UIImagePickerControllerSourceType)
Sets the type of picker interface displayed by the image picker
controller.
|
void |
setVideoMaximumDuration(double videoMaximumDuration)
Sets the maximum video length.
|
void |
setVideoQuality(int UIImagePickerControllerQualityType)
Specifies video quality.
|
boolean |
showsCameraControls()
Returns a Boolean that shows whether the camera displays the default
controls.
|
int |
sourceType()
Returns the type of picker interface displayed by the image picker
controller.
|
boolean |
startVideoCapture()
Starts video capturing.
|
void |
stopVideoCapture()
Stops video capturing.
|
void |
takePicture()
Captures a picture.
|
double |
videoMaximumDuration()
Returns the maximum video length.
|
int |
videoQuality()
Returns the video quality.
|
void |
viewWillAppear(boolean animated)
Called before the view is added to the view controller's hierarchy with
animation or not according to the Boolean parameter.
|
didReceiveMemoryWarning, didRotateFromInterfaceOrientation, isNavigationBarHidden, isToolbarHidden, loadView, navigationBar, popToRootViewControllerAnimated, popToViewController, popViewControllerAnimated, pushViewController, setNavigationBarHidden, setNavigationBarHidden, setToolbarHidden, setToolbarHidden, setViewControllers, setViewControllers, showViewController, tabBarItem, toolbar, topViewController, viewControllers, viewDidAppear, viewDidDisappear, viewWillDisappear, visibleViewController, willAnimateRotationToInterfaceOrientation, willRotateToInterfaceOrientation
addChildViewController, additionalSafeAreaInsets, allowedChildViewControllersForUnwindingFromSource, attemptRotationToDeviceOrientation, automaticallyAdjustsScrollViewInsets, beginAppearanceTransition, bottomLayoutGuide, childViewControllerContainingSegueSource, childViewControllerForStatusBarHidden, childViewControllerForStatusBarStyle, childViewControllers, contentSizeForViewInPopover, definesPresentationContext, disablesAutomaticKeyboardDismissal, dismissModalViewControllerAnimated, edgesForExtendedLayout, editButtonItem, endAppearanceTransition, extensionContext, hidesBottomBarWhenPushed, interfaceOrientation, isEditing, isModalInPopover, isViewLoaded, loadViewIfNeeded, modalPresentationStyle, modalTransitionStyle, navigationController, navigationItem, nextResponder, nibName, parentViewController, performSegueWithIdentifier, preferredInterfaceOrientationForPresentation, preferredStatusBarStyle, prefersStatusBarHidden, prepareForSegue, presentedViewController, presentingViewController, presentModalViewController, presentViewController, providesPresentationContextTransitionStyle, removeFromParentViewController, restorationIdentifier, rotatingFooterView, rotatingHeaderView, setAdditionalSafeAreaInsets, setAutomaticallyAdjustsScrollViewInsets, setContentSizeForViewInPopover, setDefinesPresentationContext, setEdgesForExtendedLayout, setEditing, setEditing, setHidesBottomBarWhenPushed, setModalInPopover, setModalPresentationStyle, setModalTransitionStyle, setNeedsStatusBarAppearanceUpdate, setProvidesPresentationContextTransitionStyle, setRestorationIdentifier, setTabBarItem, setTitle, setToolbarItems, setToolbarItems, setView, setWantsFullScreenLayout, shouldAutomaticallyForwardAppearanceMethods, shouldAutorotate, shouldAutorotateToInterfaceOrientation, shouldPerformSegueWithIdentifier, showDetailViewController, splitViewController, storyboard, supportedInterfaceOrientations, tabBarController, title, toolbarItems, topLayoutGuide, transitionFromViewController, view, viewDidLayoutSubviews, viewDidLoad, viewDidUnload, viewIfLoaded, viewSafeAreaInsetsDidChange, viewWillLayoutSubviews, wantsFullScreenLayout
becomeFirstResponder, isFirstResponder, resignFirstResponder, touchesBegan, touchesCancelled, touchesEnded, touchesMoved
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public static final String MediaType
public static final String OriginalImage
public static final String EditedImage
public static final String CropRect
public static final String MediaURL
public static final String ReferenceURL
public static final String MediaMetadata
public UIImagePickerController()
public static boolean isSourceTypeAvailable(int UIImagePickerControllerSourceType)
UIImagePickerControllerSourceType
- The specified source typepublic static List<String> availableMediaTypesForSourceType(int UIImagePickerControllerSourceType)
UIImagePickerControllerSourceType
- The specified source type.public static boolean isCameraDeviceAvailable(int UIImagePickerControllerCameraDevice)
UIImagePickerControllerCameraDevice
- The camera of the device which
is checked if it is available.public static List<Integer> availableCaptureModesForCameraDevice(int UIImagePickerControllerCameraDevice)
UIImagePickerControllerCameraDevice
- The camera of the device for
which the list is returned.public static boolean isFlashAvailableForCameraDevice(int UIImagePickerControllerCameraDevice)
UIImagePickerControllerCameraDevice
- A Boolean that shows whether
the enabled camera supports flash.public int sourceType()
public void setSourceType(int UIImagePickerControllerSourceType)
UIImagePickerControllerSourceType
- The type of picker interface
displayed by the image picker controller.public boolean allowsEditing()
public void setAllowsEditing(boolean allowsEditing)
allowsEditing
- A Boolean that defines whether the use is allowed to
edit the image or video.public UIImagePickerControllerDelegate delegate()
UINavigationController
delegate
in class UINavigationController
UINavigationControllerDelegate
public void setDelegate(UINavigationControllerDelegate delegate)
setDelegate
in class UINavigationController
delegate
- The delegate for this image picker controller.UINavigationControllerDelegate
public List<String> mediaTypes()
public void setMediaTypes(List<String> mediaTypes)
mediaTypes
- The supported media types.public double videoMaximumDuration()
public void setVideoMaximumDuration(double videoMaximumDuration)
videoMaximumDuration
- The maximum video length.public int videoQuality()
public void setVideoQuality(int UIImagePickerControllerQualityType)
UIImagePickerControllerQualityType
- The video quality.public UIView cameraOverlayView()
public void setCameraOverlayView(UIView cameraOverlayView)
cameraOverlayView
- The view to be displayed above the default image
picker interface.public CGAffineTransform cameraViewTransform()
public void setCameraViewTransform(CGAffineTransform cameraViewTransform)
cameraViewTransform
- The transformation of the image preview.public boolean showsCameraControls()
public void setShowsCameraControls(boolean showsCameraControls)
showsCameraControls
- A Boolean that defines whether the camera
displays the default controls.public int cameraCaptureMode()
public void setCameraCaptureMode(int UIImagePickerControllerCameraCaptureMode)
UIImagePickerControllerCameraCaptureMode
- The capture mode used by
the camera.public int cameraDevice()
public void setCameraDevice(int UIImagePickerControllerCameraDevice)
UIImagePickerControllerCameraDevice
- The camera to be used by the
image picker controller.public int cameraFlashMode()
public void setCameraFlashMode(int UIImagePickerControllerCameraFlashMode)
UIImagePickerControllerCameraFlashMode
- The flash mode of the
camera.public void takePicture()
public boolean startVideoCapture()
public void stopVideoCapture()
public void dismissViewControllerAnimated(boolean flag, Runnable completion)
UIViewController
dismissViewControllerAnimated
in class UIViewController
flag
- If TRUE the change is animated.completion
- block that runs after the dismissal ends. can be NULLpublic void viewWillAppear(boolean animated)
UIViewController
viewWillAppear
in class UINavigationController
animated
- If set TRUE the view is added with animation.Copyright © 2020. All rights reserved.