Reputation: 167
I am experiencing difficulty finding a delegate.
You know how we only have 2 delegate method right now in UIImagePickerControllerDelegate
.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info;
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker;
The problem is imagePickerController:didFinishPickingMediaWithInfo:info
would only activated when the capture is trying to save the image.
What I need to do is changing cameraDevice
when the "capture" button is pressed.
For example, if default cameraDevice
was Front, when the "capture" button is pressed, it will actually changes its cameraDevice to be Rear and take a picture.
imagePickerController:didFinishPickingMediaWithInfo:info
is called after the picture is taken so putting this statement in the delegate method would not work.
picker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
I need to find/implement the delegate/method that would actually make this happen. Anybody can help me please?
Upvotes: 0
Views: 284
Reputation: 2165
You can't do this with the default camera interface that Apple provided. You will have to implement your own controls. You can add overlay view on top of the provided camera UI and extend it, but you can't alter the existing controls.
Upvotes: 1