iOS 4.3改变了UIImagePickerController的相机叠加视图的转换 [英] iOS 4.3 changed transformation on UIImagePickerController's camera overlay view

查看:94
本文介绍了iOS 4.3改变了UIImagePickerController的相机叠加视图的转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS 4.3上测试我的应用程序后,我注意到我的UIImagePickerController的相机覆盖有一个额外的转换,极大地扩展了内容。在iOS 4.3之前,所有内容都显示正确。

After testing my App on iOS 4.3 I noticed that the camera overlay of my UIImagePickerController has an added transformation that stretched the content extremely. Pre iOS 4.3 everything shows up correctly.

这是我的工作

imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;

cameraOverlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
cameraOverlay.backgroundColor = [UIColor clearColor];
cameraOverlay.userInteractionEnabled = NO;

//add subviews to camera Overlay

imagePicker.cameraOverlayView = pauseButton;

我有什么想法可以摆脱增加的转变?

Any ideas what I have to do to get rid of the added transformation?

推荐答案

确定找到了答案。 ios 4.3要求将camerOverlay与屏幕一样大。所以我的200x200相机叠加层已放大。

OK found the answer. ios 4.3 requires to have the camerOverlay as big as the screen is. So my 200x200 camera overlay was enlarged.

如果我更改了行:

cameraOverlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];

cameraOverlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];

它的工作原理:)。

这篇关于iOS 4.3改变了UIImagePickerController的相机叠加视图的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆