IPhone iOS 4.3相机焦点方块 - 可编程删除? [英] IPhone iOS 4.3 camera focus square - removeable programatically?
本文介绍了IPhone iOS 4.3相机焦点方块 - 可编程删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于我的朋友将他的iPhone iOS更新为4.3,所以每次用相机拍摄照片时都会出现一个小方块。
我们正在开发一个应用程序,使用相机,并想要删除这个恼人的广场。我没有找到任何关于它的苹果的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屋!
查看全文