`
zxs19861202
  • 浏览: 909093 次
  • 性别: Icon_minigender_1
  • 来自: 湖北—》上海
社区版块
存档分类
最新评论

IOS UIImagePickerController 不能全屏

    博客分类:
  • ios
IOS 
阅读更多

添加以下代码可以使取景框全屏

 

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);

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics