gpt4 book ai didi

ios - 移动相机层位置 ios 7

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:39:34 25 4
gpt4 key购买 nike

我正在使用

在相机上设置叠加层

[_imagePickerController setCameraOverlay:_overlayView];

在此之后我正在裁剪 overlayView 可见区域的图像。

这在 ios 6 的所有尺寸下都运行良好。

但在 ios 7 上市后它给我带来了问题..看看真正的问题

这是 ios 7 iphone 5 中的相机应用程序,其中相机从顶部黑条的底部开始

现在这就是我在我的应用程序中设置相机控件时得到的结果,这里的相机是从上面开始的。但我想像向下约 20 像素那样启动相机。

enter image description here

最佳答案

正因为如此,我在 ios 7 和 iphone 5 中遇到了这个问题,所以我做了一个条件并翻译相机,然后这个相机从 10 像素向下开始。

_imagePickerCtrl.wantsFullScreenLayout = YES;
if ([[[UIDevice currentDevice] systemVersion] floatValue]>=7.0 && self.view.frame.size.height>481) {

CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0,10.0);
_imagePickerCtrl.cameraViewTransform = translate;

}

关于ios - 移动相机层位置 ios 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19462739/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com