【问题标题】:iOS 4.3 changed transformation on UIImagePickerController's camera overlay viewiOS 4.3 更改了 UIImagePickerController 的相机覆盖视图的转换
【发布时间】:2011-07-17 05:13:50
【问题描述】:

在 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;

任何想法我必须做些什么来摆脱添加的转换?

【问题讨论】:

    标签: iphone objective-c ios uiimagepickercontroller ios4


    【解决方案1】:

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

    如果我换行:

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

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

    它有效:)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-09-30
      • 1970-01-01
      • 2019-05-31
      • 2013-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多