OGeek|极客世界-中国程序员成长平台

标题: ios - 移动相机层位置ios 7 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 15:45
标题: ios - 移动相机层位置ios 7

我正在使用

设置覆盖在相机上

[_imagePickerController setCameraOverlay:_overlayView];

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

这在所有尺寸的 ios 6 上都能正常工作。

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

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

现在这就是我在我的应用程序中设置相机控制 no 时得到的,这里的相机是从上面开始的。但我想启动相机大约 20 像素。

enter image description here



Best Answer-推荐答案


因为我在 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/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4