Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone VoiceOver accessibility setting crashes video recording

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?

like image 337
James Skidmore Avatar asked Jun 11 '12 16:06

James Skidmore


1 Answers

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;
like image 80
James Skidmore Avatar answered Oct 21 '22 21:10

James Skidmore