gpt4 book ai didi

iphone - UIImagePickerController.cameraViewTransform 忽略翻译

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

我的应用程序无法在 iOS 4.3 上正常运行。它为 UIImagePickerController 使用自定义相机 View 覆盖。由于相机和屏幕之间的宽高比差异,默认情况下实时取景底部有一个黑条。为了摆脱它,我曾经应用两个转换,将 View 向下移动并将其缩放到全屏:

self.cameraFeed = [[UIImagePickerController alloc] init];
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 25.0);
self.cameraFeed.cameraViewTransform = CGAffineTransformScale(translate, 480.0/430.0, 480.0/430.0);

对于当前的 iOS 版本,翻译转换似乎没有任何作用 - 我在底部有一个 25px 的黑条,更改值没有任何效果。然而,缩放和旋转变换按预期工作。

有人遇到过类似的问题吗?

最佳答案

您应该使用视频预览层(如果没记错,自 4.2 起可用)而不是 UIImagePicker。有了它,您可以根据需要完全自定义您的 UI。

关于iphone - UIImagePickerController.cameraViewTransform 忽略翻译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6521518/

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