IPhone iOS 4.3 camera focus square - removeable programmatically?

前端 未结 3 889
深忆病人
深忆病人 2020-12-10 22:57

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 cam

相关标签:
3条回答
  • 2020-12-10 23:00

    Setting the .showsCameraControls property of your picker controller to NO should remove the focus square (it did pre 4.3, I don't think anything has changed), but the downside is you'll need to provide your own controls (to take photos, etc). It's all or nothing I'm afraid!

    0 讨论(0)
  • 2020-12-10 23:17

    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];
            }
        }
    
    0 讨论(0)
  • 2020-12-10 23:20

    Create a custom overlay and default overlay will not display. You can make your overlay can be completely empty.

    0 讨论(0)
提交回复
热议问题