【问题标题】:UIImagePickerController Camera Shutter not openingUIImagePickerController 相机快门未打开
【发布时间】:2013-08-22 19:06:07
【问题描述】:

我有一个 UIImagePickerController ,在源类型的相机中。 有时相机快门打不开,但我可以拍照。

有时效果很好?

我使用 UIImagePickerController 的子类

- (id)init{

    self = [super init];
        if (self) {
    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){


                    [self setSourceType:UIImagePickerControllerSourceTypeCamera];

                     self.showsCameraControls =NO;
                    [self setWantsFullScreenLayout:YES];
                    self.cameraOverlayView = bottomToolBar;
                    self.cameraOverlayView = topToolBar;

                }
                else{
                    [self setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
                }
        }
    }

bottomToolBar 和 topToolBar 是工具栏。

任何人都可以帮助我。

【问题讨论】:

  • 现在编辑源代码。
  • 它添加在初始化函数中。它是 UIImagePickerController 的子类
  • 问题是内存问题。

标签: ios6 camera uiimagepickercontroller xcode4.6


【解决方案1】:

我遇到了同样的问题。 SO上有类似的线程。不幸的是,它们都不适合我,我不得不在每次打开图像选择器时重新实例化它

您应该阅读这两个主题,看看他们的解决方案是否适合您。

UIImagePickerController's shutter

Custom ios camera shutter not opening?

【讨论】:

  • 问题是内存问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多