WZCamera
IntroductionThe WZCamera class provides an interface for accessing and controlling a camera device. The 'cameras' property of WZCameraPreview can be used to retrieve a list of all cameras. Methods
initWithCaptureDevice:- (nonnull instancetype) initWithCaptureDevice:(nonnull AVCaptureDevice *)captureDevice; ParametersReturn ValueAn instance of WZCamera DiscussionInitialize a WZCamera from a given AVCaptureDevice isBack- (BOOL) isBack; Return ValueYES if this is the back-facing camera, otherwise NO DiscussionIs this the back-facing camera isFront- (BOOL) isFront; Return ValueYES if this is the front-facing camera, otherwise NO DiscussionIs this the front-facing camera setExposureMode:exposurePoint:- (void) setExposureMode:(WZCameraExposureMode)exposureMode exposurePoint:(CGPoint)point; ParametersDiscussionSets the exposure mode for this camera at a given point of interest. setFocusMode:focusPoint:- (void) setFocusMode:(WZCameraFocusMode)focusMode focusPoint:(CGPoint)point; ParametersDiscussionSets the focus mode for this camera at a given point of interest. supportsExposureMode:- (BOOL) supportsExposureMode:(WZCameraExposureMode)mode; ParametersReturn ValueYES if the camera supports the exposure mode, otherwise no DiscussionDoes the camera support the given exposure mode supportsFocusMode:- (BOOL) supportsFocusMode:(WZCameraFocusMode)mode; ParametersReturn ValueYES if the camera supports the focus mode, otherwise no DiscussionDoes the camera support the given focus mode supportsWidth:- (BOOL) supportsWidth:(NSUInteger)width; ParametersReturn ValueYES if the width is supported by the camera, otherwise NO DiscussionDoes the camera support the given frame width TypedefsNS_ENUMtypedef NS_ENUM(NSUInteger, WZCameraDirection) { WZCameraDirectionBack = 0, WZCameraDirectionFront }; Constants
DiscussionA camera direction, either front or back. See Also NS_ENUMtypedef NS_ENUM(NSUInteger, WZCameraFocusMode) { WZCameraFocusModeLocked = 0, WZCameraFocusModeAuto, WZCameraFocusModeContinuous }; Constants
DiscussionA camera focus mode. See Also NS_ENUMtypedef NS_ENUM(NSUInteger, WZCameraExposureMode) { WZCameraExposureModeLocked = 0, WZCameraExposureModeAuto, WZCameraExposureModeContinuous }; Constants
DiscussionA camera exposure mode. See Also WZCameraDirectiontypedef NS_ENUM(NSUInteger, WZCameraDirection) { WZCameraDirectionBack = 0, WZCameraDirectionFront }; Constants
DiscussionA camera direction, either front or back. See Also WZCameraExposureModetypedef NS_ENUM(NSUInteger, WZCameraExposureMode) { WZCameraExposureModeLocked = 0, WZCameraExposureModeAuto, WZCameraExposureModeContinuous }; Constants
DiscussionA camera exposure mode. See Also WZCameraFocusModetypedef NS_ENUM(NSUInteger, WZCameraFocusMode) { WZCameraFocusModeLocked = 0, WZCameraFocusModeAuto, WZCameraFocusModeContinuous }; Constants
DiscussionA camera focus mode. See Also Properties
cameraId@property (readonly) NSUInteger cameraId; DiscussionA unique identifier for this camera direction@property (readonly) WZCameraDirection direction; DiscussionThe facing direction of this camera exposureMode@property (nonatomic) WZCameraExposureMode exposureMode; DiscussionThe exposure mode for this camera focusMode@property (nonatomic) WZCameraFocusMode focusMode; DiscussionThe focus mode for this camera frameSizes@property (nonatomic, nonnull, readonly) NSArray<NSValue *> *frameSizes; DiscussionThe supported frame sizes for this camera, as an array of CGSize values hasTorch@property (nonatomic, readonly) BOOL hasTorch; DiscussionReturns whether or not this camera has a torch (flash) iOSCaptureDevice@property (nonatomic, readonly, nonnull) AVCaptureDevice *iOSCaptureDevice; DiscussionThe AVCaptureDevice represented by this camera supportedPresetConfigs@property (nonatomic, nonnull, readonly) NSArray<WZMediaConfig *> *supportedPresetConfigs; DiscussionThe supported WZMediaConfigs for this camera torchOn@property (nonatomic, getter=isTorchOn) BOOL torchOn; DiscussionSet the torch (flash) on or off |