2011-03-17 69 views
2

在iOS 4.3上测试我的应用程序后,我注意到我的UIImagePickerController的摄像头叠加层具有一个额外的转换功能,可极大地扩展内容。 Pre iOS 4.3一切正常显示。iOS 4.3在UIImagePickerController的摄像头覆盖视图上更改了转换

这是我做的

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; 

任何想法我要做摆脱加改造的?

回答

5

OK找到了答案。 ios 4.3需要让camerOverlay和屏幕一样大。所以我的200x200相机覆盖面被放大了。

如果我改变行:

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

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

工程:)。

+0

谢谢!这有帮助 – 5hrp 2011-05-20 13:09:25