Do you know any way / method to take a photo in iOS and saving it to camera Roll only with a simple button pressure without showing any preview?
I already know how to show the camera view but it show the preview of the image and the user need to click the take photo button to take the photo.
In few Words: the user click the button, the picture is taken, without previews nor double checks to take / save the photo.
I already found the takePicture
method of UIIMagePickerController
Class http://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/occ/instm/UIImagePickerController/takePicture
You can use the cool new jailbreak tweak on iOS 10 that will allow you to take pictures without having to launch the camera app. QuickShoot Pro iOS 10 jailbreak tweak will capture a photo with just the tap of a button.
Take a photo or videoTap the Shutter button, or press either volume button to take a photo. Tip: If you want to take a video while you're in Photo mode, touch and hold the Shutter button to record a QuickTake video (iPhone 11 and later).
Just open the Camera Roll or Photos app on the device, find and play the video, then pause at the video frame which you like to grab and save as image file, finally press the home and sleep buttons simultaneously.
Set the showsCameraControls
-Property to NO
.
poc = [[UIImagePickerController alloc] init];
[poc setTitle:@"Take a photo."];
[poc setDelegate:self];
[poc setSourceType:UIImagePickerControllerSourceTypeCamera];
poc.showsCameraControls = NO;
You also have to add your own Controls as a custom view on the top of poc.view
. But that is very simple and you can add your own UI-style by that way.
You receive the image-data as usually within the imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:
To take the photo, you call
[poc takePicture];
from your custom button.
Hope, that works for you.
Assuming you want a point-and-shoot method, you can create an AVSession and just call the UIImageWriteToSavedPhotosAlbum method. Here is a link that goes into that exact process: http://www.musicalgeometry.com/?p=1297
It's also worth noting that your users need to have given the app access to their camera roll or you may experience issues saving the images.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With