iPhone iOS 4.3相机对焦方块-是否可以通过编程移除? [英] IPhone iOS 4.3 camera focus square - removeable programmatically?
本文介绍了iPhone iOS 4.3相机对焦方块-是否可以通过编程移除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
自从我的朋友将他的iPhone iOS更新到4.3之后,每次他用相机拍照时都会出现一个小方块。
我们正在开发一个使用相机的应用程序,并希望删除该烦人的正方形。我在Apple的UIImagePickerController文档中找不到任何相关信息。
在以前的iOS版本中不存在该正方形。
Since my friend updated his iPhone iOS to 4.3 there's a small square which appears every time he takes a picture with the camera. We're developing an app that uses the camera and would like to remove this annoying square. I didn't find anything about it in Apple's UIImagePickerController documentation. The square didn't exist in former iOS versions.
推荐答案
您可能想要尝试将焦点锁定到禁用自动对焦。以下是示例代码:
You may want to try to lock the focus to disable auto-focus. Here is a sample code:
NSArray *devices = [AVCaptureDevice devices];
NSError *error;
for (AVCaptureDevice *device in devices) {
if (([device hasMediaType:AVMediaTypeVideo]) &&
([device position] == AVCaptureDevicePositionBack) ) {
[device lockForConfiguration:&error];
if ([device isFocusModeSupported:AVCaptureFocusModeLocked]) {
device.focusMode = AVCaptureFocusModeLocked;
NSLog(@"Focus locked");
}
[device unlockForConfiguration];
}
}
这篇关于iPhone iOS 4.3相机对焦方块-是否可以通过编程移除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文