I've finally nailed down a bug that crashes a UIImagePickerController
when recording video. When the iPhone's VoiceOver accessibility setting is enabled, the recorder crashes without fail when calling presentModalViewController
.
I've been unsuccessful so far in coming up with a workaround. Has anyone else experienced this and been able to fix it?
As @kamens mentioned in the comments above, a workaround is to include camera.showsCameraControls = NO
in a completion block when presenting the modal view controller, like this:
[controller presentViewController:self animated:YES completion:^{self.showsCameraControls = NO;}];
However, with this solution, the camera controls flash momentarily as the camera is presented, then they disappear. Obviously not ideal when the controls really need to be hidden. The other workaround is to set camera.showsCameraControls = OFF
... even less ideal.
@quellish, this is the output from the crash:
*** -[PLCameraToggleButton setAccessibilityValue:]: message sent to deallocated instance 0x4a330b0
@kamens, here is the code I'm using to set the mediaTypes
and captureMode
:
tmpCamera.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];
tmpCamera.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
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