简体   繁体   中英

Remove black bar bottom of UIImagePickerController

How can I remove the black bar at the bottom of the camera view and make the photo preview take up the entire screen?

在此输入图像描述

As, in iOS7 image picker move to whole screen but prior to iOS7 you may not have full screen camera view so that you may need to apply transformation in your screen view

if your device is running iOS6 (4 inch):

CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.930);

if your device is running iOS6 (3.5 inch):

CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.260);

if your device is running on iOS7 (4 inch)

 CGAffineTransform cameraTransform = CGAffineTransformMakeScale(1.0, 1.670); self.picker.cameraViewTransform = cameraTransform; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM