CBLFocusInfo
Objective-C
@protocol CBLFocusInfo <NSObject>
Swift
protocol FocusInfo : NSObjectProtocol
Represents an autofocus state of the camera.
-
Returns the aspect of the autofocus, typically representing the area of the viewfinder.
Declaration
Objective-C
@property (nonatomic, readonly) CGSize aspect;
Swift
var aspect: CGSize { get }
-
Returns an array of
CBLFocusPoint
instances that define the autofocus cluster.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSArray<id<CBLFocusPoint>> *points;
Swift
var points: [any FocusPoint]? { get }
-
Translates the given AF point’s rect to a rect inside the target container. Useful for translating AF point rects into views, for example.
Declaration
Objective-C
- (CGRect)translateRectOfPoint:(nonnull id<CBLFocusPoint>)point toSubRectOfRect:(CGRect)targetContainer;
Swift
func translateRect(of point: any FocusPoint, toSubRectOf targetContainer: CGRect) -> CGRect
Parameters
point
The AF point to translate.
targetContainer
The rect defining the bounds of the target container.
Return Value
The rect representing
point
insidetargetContainer
.