Locks the lens position at the specified value.
SDKs
- iOS 8.0+
- Mac Catalyst 13.0+
Framework
- AVFoundation
Declaration
- (void)setFocusModeLockedWithLensPosition:(float)lensPosition completionHandler:(void (^)(CMTime syncTime))handler;
Parameters
lensPosition
The lens position. A value of
AVCapture
can be used to indicate that the caller does not wish to specify a value for lensPosition.Lens Position Current handler
A block that is called when
lens
has been set to the value specified andPosition focus
isMode AVCapture
. The block receives a timestamp matching that of the first buffer to which all settings have been applied.Focus Mode Locked The timestamp is synchronized to the device clock, and thus must be converted to the master clock before comparison with the timestamps of buffers delivered by AVCaptureVideoDataOutput instance.
The client may pass
nil
for the handler parameter if knowledge of the operation's completion is not required.
Discussion
This method is the only way to set the lens
property.
This method throws an NSInvalid
exception if lens
is set to an unsupported level. A NSGeneric
exception is thrown if the method is called without first obtaining exclusive access to the receiver using lock
.