autofocus

Focus (Autofocus) not working in camera (AVFoundation AVCaptureSession)

时光总嘲笑我的痴心妄想 提交于 2019-11-26 20:16:16
问题 I am using standard AVFoundation classes to capture video and show preview (http://developer.apple.com/library/ios/#qa/qa1702/_index.html) Here is my code: - (void)setupCaptureSession { NSError *error = nil; [self setCaptureSession: [[AVCaptureSession alloc] init]]; self.captureSession.sessionPreset = AVCaptureSessionPresetMedium; device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; if ([device isFocusModeSupported:AVCaptureFocusModeContinuousAutoFocus] && [device

Mobile Safari Autofocus text field

筅森魡賤 提交于 2019-11-26 03:23:49
问题 In Mobile Safari I am unable to focus onto a text field after setting a delay period. I\'m attaching some example code showcasing the issue. If, onclick of the button, you trigger .focus(), everything works as expected. If you hang the focus on a callback, like the setTimeout function, then it fails ONLY in mobile safari. In all other browsers, there is a delay, then the focus occurs. Confusingly, the \"focusin\" event is triggered, even in mobile safari. This (and ~similar~ comments in SO)

Mobile Safari Autofocus text field

試著忘記壹切 提交于 2019-11-25 19:20:16
In Mobile Safari I am unable to focus onto a text field after setting a delay period. I'm attaching some example code showcasing the issue. If, onclick of the button, you trigger .focus(), everything works as expected. If you hang the focus on a callback, like the setTimeout function, then it fails ONLY in mobile safari. In all other browsers, there is a delay, then the focus occurs. Confusingly, the "focusin" event is triggered, even in mobile safari. This (and ~similar~ comments in SO) make me think that it's a mobile safari bug. Any guidance will be accepted. I've tested in the emulator,