iOS 4.3改变了UIImagePickerController的相机叠加视图的转换

sli*_*ver 2 iphone objective-c uiimagepickercontroller ios4 ios

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

这就是我的工作

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;
Run Code Online (Sandbox Code Playgroud)

任何想法,我必须做什么来摆脱增加的转变?

sli*_*ver 5

好的找到了答案.ios 4.3要求将camerOverlay与屏幕一样大.所以我的200x200相机覆盖层被放大了.

如果我换行:

cameraOverlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
Run Code Online (Sandbox Code Playgroud)

cameraOverlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
Run Code Online (Sandbox Code Playgroud)

有用 :).