UIImagePickerController上的相机按钮被随机取消



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

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

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

还有人有这个问题吗?

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

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

试试这个,我想它可能会帮助你,谢谢!!

最新更新