AVCaptureDevice.SetFocusModeLocked(Single, Action<CMTime>) Method

Definition

Locks the lens position at the specified position.

[Foundation.Export("setFocusModeLockedWithLensPosition:completionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void SetFocusModeLocked (float lensPosition, Action<CoreMedia.CMTime> completionHandler);
abstract member SetFocusModeLocked : single * Action<CoreMedia.CMTime> -> unit
override this.SetFocusModeLocked : single * Action<CoreMedia.CMTime> -> unit

Parameters

lensPosition
Single

Sets the lens position, must be a value between 0.0 and 1.0. The zero value representing the shortest position that the camera can focus and one representing the furthest position that it can focus.

If you do not want to set the lens position, pass the LensPositionCurrent value.

completionHandler
Action<CMTime>

Method to invoke when the camera has been changed to the specified lens position, the parameter of the callback is the time at which the change took place.

This parameter can be null.

Attributes

Remarks

You must invoke the LockForConfiguration(NSError) method before invoking this method.

Applies to