Edit: It has been suggested this post is a duplicate, which is not the case as the black bars are not initially present an an affine transformation does not remedy the problem.
I run this on an iPad Air 2 and target iOS 8.
I have a UIImagePickerController
whose showsCameraControls
property is set to NO
. When starting the app in landscape and then zooming in, this is what happens (all images are non-cropped):
A black bar appears and can be gotten rid of by changing device orientation to portrait (which will also show the black bar) and then changing it back.
After change to portrait:
Back to landscape (+ zooming in):
Strangely, after returning to landscape, the zoom slider is not visible anymore during zooming. When starting from portrait initially, zooming first works until one changes to landscape, where a black bar appears, which stays when going back to portrait.
None of this happens when setting showsCameraControls
to YES
.
How can I get rid of this issue?
UPDATE: Apple claims to have fixed this in iOS 9.
I have found one way to work around what I for lack of better understanding would label a bug (as it happens with apple-provided samples as well).
The solution for me is to do manual zooming, by adding a
UIPinchGestureRecognizer
to the overlay view. The Controller must then implement a zooming callback which will get rid of the phenomenon described above.