Chris Lacy
Chris Lacy

Reputation: 4462

UIImagePickerController photo preview is obscured by an unknown black frame

I'm experiencing a weird issue when using a UIImagePickerController, best evidenced in the image below.

I do a standard [self presentModalViewController:imagePicker animated:YES]; call, which brings the iOS camera on screen, and the shutter animation displays full screen as per normal.

But once the shutter opens, the area usually encompassed by the Status Bar updates as I would expect with a photo preview, but the rest of the screen is black, save for the Camera controls bar at the bottom.

If I take a photo, the black fram goes away, and I can crop the image as per usual. Also, the resulting image that comes back via - imagePickerController:didFinishPickingMediaWithInfo: is a valid full screen image.

My question is, why is the majority of the screen black during the photo preview phase? Many thanks.

Bug

Upvotes: 2

Views: 1035

Answers (1)

Chris Lacy
Chris Lacy

Reputation: 4462

I tracked the issue down. The application I am working on uses UIViewControllers in a non-standard manner, and the bug was caused by my adding the UIImagePickerController instance modal to the incorrect UIViewController instance.

Incorrect: [self presentModalViewController:imagePicker animated:YES];

Correct: [otherViewController presentModalViewController:imagePicker animated:YES];

Hope this helps someone else somewhere down the line.

Upvotes: 1

Related Questions