【问题标题】:Camera button on UIImagePickerController is randomly disbledUIImagePickerController 上的相机按钮被随机禁用
【发布时间】:2012-03-28 04:25:23
【问题描述】:

我有一个用来拍照的 UIImagePickerController(源类型相机)。我把它正确地放在了我的 .h(添加了@property)和 .m(@synthesize)中。这是我用来展示它的内容:

if (thePicker == nil) {
thePicker = [[UIImagePickerController alloc] init];
thePicker.delegate = self;
thePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
thePicker.allowsEditing = NO;
}

[self presentModalViewController:thePicker animated:YES];

我遇到了一个奇怪的问题。时不时地,在关闭/打开它几次后,相机按钮或使用的按钮将不起作用(但重拍和取消按钮起作用)。我没有收到任何内存警告,并且我有一个 dealloc 和 didReceiveMemoryWarnings void 语句,但它们没有被调用。

还有其他人遇到这个问题吗?

【问题讨论】:

    标签: iphone objective-c uiimagepickercontroller


    【解决方案1】:

    我看到一些应用程序用它们的覆盖层覆盖了它,但你不能删除它。 AVCaptureSession 听起来确实更适合您的目的。我在这里看到一个例子:

    http://www.musicalgeometry.com/?p=1273

    试试这个可能对你有帮助,我猜谢谢!!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-18
      • 2012-11-21
      • 2017-03-24
      • 1970-01-01
      相关资源
      最近更新 更多