Hide Record Button in UIImagePickerController

I have a question about UIImagePickerController. Can I use UIImagePickerController as a preview? If I like it, I need to hide the record button, is there any way to do this? or any other approach to show our preview other than UIImagePickerController.

thanks for the help...

0
ios iphone cocoa-touch camera uiimagepickercontroller
source share
1 answer

UIImagePickerController can UIImagePickerController controls with:

 [myImagePickerController setShowsCameraControls:NO]; 

EDIT: Check this code, it hides all the controls inside the image picker, which allows you to create and add your own custom controls. Unfortunately, you cannot selectively hide controls inside the collector, so this is an alternative.

 - (void)showCamera { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { myImagePicker = [[UIImagePickerController alloc] init]; [myImagePicker setSourceType:UIImagePickerControllerSourceTypeCamera]; [myImagePicker setDelegate:self]; [myImagePicker setShowsCameraControls:NO]; UIView *overlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; UIButton *switchCameraButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [switchCameraButton setFrame:CGRectMake(10, 430, 72, 40)]; [switchCameraButton addTarget:self action:@selector(changeCamera:) forControlEvents:UIControlEventTouchUpInside]; [overlayView addSubview:switchCameraButton]; [myImagePicker setCameraOverlayView:overlayView]; [self presentViewController:myImagePicker animated:YES completion:nil]; } } - (IBAction)changeCamera:(id)sender { if (myImagePicker.cameraDevice == UIImagePickerControllerCameraDeviceFront) { [myImagePicker setCameraDevice:UIImagePickerControllerCameraDeviceRear]; }else{ [myImagePicker setCameraDevice:UIImagePickerControllerCameraDeviceFront]; } } 
+2
source share

All Articles