Here I am developing an app using IOS 7 in which camera used to capture the image. but after capturing image it displaying Retake/Use Photo options. i want that after capturing image it directly go to next screen without showing default Retake?use Photo Options.I google out this Issue but I don't get proper solution. Please help me to solve this issue.
Thanks in advance.
Here is the code snippet that i am using in my project
-(void)StartCamera
{
if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Device has no camera" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
[myAlertView show];
}
else
{
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = NO;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
}
}
The stock UIImagePickerControllerSourceTypeCamera
provided by iOS has both these buttons.
One way to achieve what you want is to continue to use UIImagePickerViewController
and set showsCameraControls
to NO
. Then, provide your own user interface using cameraOverlayView
for your custom overlay view.
self.picker.showsCameraControls = NO;
self.overlay = [[OverlayViewController alloc] initWithNibName:@"Overlay" bundle:nil];
self.overlay.pickerReference = self.picker;
self.picker.cameraOverlayView = self.overlay.view;
self.picker.delegate = self.overlay;
Another way is to use AVFoundation
to create your own camera view.
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