In order to make my custom UIImagePickerSourceTypeCamera, I had to do this:
pickerOne = [[UIImagePickerController alloc] init];
pickerOne.delegate = self;
pickerOne.sourceType = UIImagePickerControllerSourceTypeCamera;
pickerOne.showsCameraControls = NO;
pickerOne.navigationBarHidden = YES;
pickerOne.toolbarHidden = YES;
pickerOne.wantsFullScreenLayout = YES;
But now, when I take a picture like this:
[cameraButton addTarget:pickerOne
action:@selector(takePicture)
forControlEvents:UIControlEventTouchUpInside];
it doesn’t show the shutter when you take the picture. Is there a way to show it programmatically?
It is possible. The trick is to do the following:
Enable the camera controls on initializing the picker (this will enable the shutter view).
Overlay the camera controls with your own view which has the
cameraButtonIn your
takePicture:method do the following:In the
imagePickerController:didFinishPickingMediaWithInfo:method do the following: