How to disable video capture in UIImagePickerController How to disable video capture in UIImagePickerController objective-c objective-c

How to disable video capture in UIImagePickerController


Or remove this line:

cameraUI.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType: UIImagePickerControllerSourceTypeCamera];

The default value for cameraUI.mediaTypes is "kUTTypeImage". See the documentation.


You just have to set the mediaType property of UIImagePickerController to only contain images, the one you are using there is used to assign all available media types..you can read about it here, if you arent sure what the types are you can always output them to console and then just set that array with the appropriate one (to allow only pictures)