I am displaying UIImagePickerController in a landscape manner using custom overlay. Because of the camera aspect ratio in iPhone 5 and 5S, I had to scale the live preview of the image using "cameraViewTransform".
CGSize screenSize = [[UIScreen mainScreen] bounds].size;
float cameraAspectRatio = 4.0 / 3.0;
float imageWidth = floorf(screenSize.width * cameraAspectRatio);
float scale = ceilf((screenSize.height / imageWidth) * 10.0) / 10.0;
m_objImagePickerController.cameraViewTransform = CGAffineTransformMakeTranslation(0, (screenSize.height - imageWidth) / 2.0);
m_objImagePickerController.cameraViewTransform = CGAffineTransformScale(m_objImagePickerController.cameraViewTransform, scale, scale);
This was inspired from this post : UIImagePickerController doesn't fill screen
It worked perfectly fine till the arrival of iOS 8. Seems like the scaling of cameraViewTransform is not working in iOS 8. But the translation is taking effect. Because of this, I can see significant black bars in live camera preview. Below is the screenshot.
Please note that I have not switched to Xcode 6 as of now. This is with Xcode 5.1.1 only. I have to move my application to app store in few days. Then I will switch to Xcode 6. Before that, I don't want to take any chances.
If anybody faced this issue, please help. I am not finding any solution for iOS 8.