【IOS】iphone 5s UIImagePickerController未全屏问题

今天做到5s打开自定义相机时  取景无法全屏问题  如下图

【IOS】iphone 5s  UIImagePickerController未全屏问题

添加以下代码可以解决问题  将取景框变成全屏

        {
            CGSize screenBounds = [UIScreen mainScreen].bounds.size;
            CGFloat cameraAspectRatio = 4.0f/3.0f;
            CGFloat camViewHeight = screenBounds.width * cameraAspectRatio;
            CGFloat scale = screenBounds.height / camViewHeight;
            pickerController.cameraViewTransform = CGAffineTransformMakeTranslation(0, (screenBounds.height - camViewHeight) / 2.0);
            pickerController.cameraViewTransform = CGAffineTransformScale(pickerController.cameraViewTransform, scale, scale);
        }

【IOS】iphone 5s  UIImagePickerController未全屏问题

【IOS】iphone 5s UIImagePickerController未全屏问题,布布扣,bubuko.com

【IOS】iphone 5s UIImagePickerController未全屏问题

上一篇:Android:实现退出确认对话框


下一篇:开源 android