ADKCamera Class Reference

Inherits from NSObject
Declared in ADKCamera.h
ADKCamera.m

  delegate

The delegate instance for implement ADKCameraDelegate methods. For example, you can use it to monitor focusing, exposuring, error handling and etc.

@property (weak, nonatomic) id<ADKCameraDelegate> delegate

Declared In

ADKCamera.h

  liveVideoDataDlegate

The delegate instance for implement ADKCameraLiveVideoDataDelegate methods. This delegate will handle live video data process and you can do the real-time image analysis.

@property (weak, nonatomic) id<ADKCameraLiveVideoDataDelegate> liveVideoDataDlegate

Declared In

ADKCamera.h

  alignDeviceOrientation

This property is determined to align photo or video’s orientation with device or UIViewController. If you want to align with device orientation but UIViewController wouldn’t rotate the UI, you should set alignDeviceOrientation with YES.

@property (assign, nonatomic) BOOL alignDeviceOrientation

Declared In

ADKCamera.h

  trackLiveVideoData

This property is determined to enable or disable live video data sample feature. It allows you to get live video data when the camera is turned on by CameraKit. Please implement ADKCameraLiveVideoDataDelegate interface to handle data. (This feature is only for camera mode now. It doesn’t contain camecoder mode. Using initCameraWithDelegate:quality:position: series initialized method to create live video data camera.)

@property (assign, nonatomic) BOOL trackLiveVideoData

Declared In

ADKCamera.h

  cameraQuality

The camera quality of image output result. This values should be the same with sessionPreset in AVCaptureSession.

@property (strong, readonly, nonatomic) NSString *cameraQuality

Declared In

ADKCamera.h

  cameraPosition

The camera position you want to use. It might be front or rear camera on your device. Please refer ADKCameraPosition to set this value to ADKCamera. Default value will be ADKCameraPositionRear.

@property (assign, nonatomic) ADKCameraPosition cameraPosition

Declared In

ADKCamera.h

  cameraFlashMode

The flash mode you want to use. It might be on, off or auto on your device. Please refer ADKCameraFlashMode to set this value to ADKCamera. Default value will be ADKCameraFlashModeOff.

@property (assign, nonatomic) ADKCameraFlashMode cameraFlashMode

Declared In

ADKCamera.h

  cameraTorchMode

The torch mode you want to use. It might be on or off on your device. Please refer ADKCameraTorchMode to set this value to ADKCamera. Default value will be ADKCameraTorchModeOff.

@property (assign, nonatomic) ADKCameraTorchMode cameraTorchMode

Declared In

ADKCamera.h

  cameraMirrorMode

The mirror mode you want to use. It can be control real-time preview view on captureVideoPreviewLayer when you’re using front camera. It might be on, off or auto on your device. Please refer ADKCameraMirrorMode to set this value to ADKCamera. Default value will be ADKCameraMirrorModeAuto.

@property (assign, nonatomic) ADKCameraMirrorMode cameraMirrorMode

Declared In

ADKCamera.h

  cameraFocusMode

The focus mode you want to use. It might be locked, auto or continuous auto on your device. Please refer ADKCameraFocusMode to set this value to ADKCamera. Default value will be ADKCameraFocusModeAutoFocus.

@property (assign, nonatomic) ADKCameraFocusMode cameraFocusMode

Declared In

ADKCamera.h

  cameraExposureMode

The exposure mode you want to use. It might be locked, auto or continuous auto on your device. Please refer ADKCameraExposureMode to set this value to ADKCamera. Default value will be ADKCameraExposureModeAutoExposure.

@property (assign, nonatomic) ADKCameraExposureMode cameraExposureMode

Declared In

ADKCamera.h

  cameraWhiteBlanceMode

The white balance mode you want to use. It might be locked, auto or continuous auto on your device. Please refer ADKCameraWhiteBlanceMode to set this value to ADKCamera. Default value will be ADKCameraWhiteBlanceModeAutoWhiteBalance.

@property (assign, nonatomic) ADKCameraWhiteBlanceMode cameraWhiteBlanceMode

Declared In

ADKCamera.h

  captureVideoPreviewLayer

The camera preview view with AVCaptureVideoPreviewLayer. It can preview real-time image from camera sensor. The preview might be mirror image if you turn on mirror mode by using cameraMirrorMode.

@property (strong, readonly, nonatomic) AVCaptureVideoPreviewLayer *captureVideoPreviewLayer

Declared In

ADKCamera.h

  recording

It’s camera recording status. If camera is recording video, it will return YES. Please notice the camera only can record one video simultaneously.

@property (assign, readonly, nonatomic) BOOL recording

Declared In

ADKCamera.h

  minExposureBias

The minimum value of exposure bias. Please keep exposure bias value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minExposureBias

Declared In

ADKCamera.h

  maxExposureBias

The maximum value of exposure bias. Please keep exposure bias value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxExposureBias

Declared In

ADKCamera.h

  exposureBias

The current exposure bias setting on your camera. Bigger exposure bias will cause brighter image result otherwise lower exposure bias will get darker image result.

@property (assign, nonatomic) CGFloat exposureBias

Declared In

ADKCamera.h

  minShutterSpeed

The minimum value of shutter speed that current camera can support. Please keep shutter speed value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minShutterSpeed

Declared In

ADKCamera.h

  maxShutterSpeed

The maximum value of shutter speed that current camera can support. Please keep shutter speed value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxShutterSpeed

Declared In

ADKCamera.h

  shutterSpeed

The current shutter speed setting on your camera. Bigger shutter speed will get clearer image result otherwise lower shutter speed will get blur image result.

@property (assign, nonatomic) CGFloat shutterSpeed

Declared In

ADKCamera.h

  minISO

The minimum value of ISO that current camera can support. Please keep ISO value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minISO

Declared In

ADKCamera.h

  maxISO

The maximum value of ISO that current camera can support. Please keep ISO value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxISO

Declared In

ADKCamera.h

  ISO

The current ISO setting on your camera. Bigger ISO will get faster shutter speed otherwise lower ISO will get slower shutter speed.

@property (assign, nonatomic) CGFloat ISO

Declared In

ADKCamera.h

  minZoomFactor

The minimum value of zoom factor that current camera can support. Please keep zoom factor value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minZoomFactor

Declared In

ADKCamera.h

  maxZoomFactor

The maximum value of zoom factor that current camera can support. Please keep zoom factor value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxZoomFactor

Declared In

ADKCamera.h

  zoomFactor

The current zoom factor setting on your camera. Bigger zoom factor can get zoom in effect but blurer image result.

@property (assign, nonatomic) CGFloat zoomFactor

Declared In

ADKCamera.h

  minLensPosition

The minimum value of lens position that current camera can support. Please keep lens position value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minLensPosition

Declared In

ADKCamera.h

  maxLensPosition

The maximum value of lens position that current camera can support. Please keep lens position value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxLensPosition

Declared In

ADKCamera.h

  lensPosition

The current lens position setting on your camera. Lower lens position can reach closer focus otherwise higher lend position can reach farer focus.

@property (assign, nonatomic) CGFloat lensPosition

Declared In

ADKCamera.h

  minWhiteBalanceTemperature

The minimum value of white balance temperature that current camera can support. Please keep white balance temperature value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minWhiteBalanceTemperature

Declared In

ADKCamera.h

  maxWhiteBalanceTemperature

The maximum value of white balance temperature that current camera can support. Please keep white balance temperature value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxWhiteBalanceTemperature

Declared In

ADKCamera.h

  whiteBalanceTemperature

The current white balance temperature setting on your camera. The white balance color correlated temperature in kelvin. This property will effect color of final image result.

@property (assign, nonatomic) CGFloat whiteBalanceTemperature

Declared In

ADKCamera.h

  minWhiteBalanceTint

The minimum value of white balance tint that current camera can support. Please keep white balance tint value bigger than this value.

@property (assign, readonly, nonatomic) CGFloat minWhiteBalanceTint

Declared In

ADKCamera.h

  maxWhiteBalanceTint

The maximum value of white balance tint that current camera can support. Please keep white balance tint value less than this value.

@property (assign, readonly, nonatomic) CGFloat maxWhiteBalanceTint

Declared In

ADKCamera.h

  whiteBalanceTint

The current white balance tint setting on your camera. This property will effect strength of white balance temperature.

@property (assign, nonatomic) CGFloat whiteBalanceTint

Declared In

ADKCamera.h

  lowLightBoost

Enable or disable low light boost mechanism on your camera. When you assign YES value into this property, it means you want to enable this feature.

@property (assign, nonatomic) BOOL lowLightBoost

Declared In

ADKCamera.h

  stabilization

Enable or disable stabilization mechanism on your camera. When you assign YES value into this property, it means you want to enable this feature.

@property (assign, nonatomic) BOOL stabilization

Declared In

ADKCamera.h

+ cameraPermission

Getting status of camera permission. If it return YES means user already approved camera permission that you have permission to use their camera. When it return NO, please handle permission request process by yourself.

+ (BOOL)cameraPermission

Return Value

Camera permission status in BOOL value.

Declared In

ADKCamera.h

+ microphonePermission

Getting status of microphone permission. If it return YES means user already approved microphone permission that you have permission to use their microphone. When it return NO, please handle permission request process by yourself.

+ (BOOL)microphonePermission

Return Value

Microphone permission status in BOOL value.

Declared In

ADKCamera.h

+ frontCameraAvailable

Checking for capability of using front camera. If it return YES means current device has this sensor and you can use it. When it return NO, it means current device might be not exist or have no capability to use it.

+ (BOOL)frontCameraAvailable

Return Value

Front camera available status in BOOL value.

Declared In

ADKCamera.h

+ rearCameraAvailable

Checking for capability of using rear camera. If it return YES means current device has this sensor and you can use it. When it return NO, it means current device might be not exist or have no capability to use it.

+ (BOOL)rearCameraAvailable

Return Value

Rear camera available status in BOOL value.

Declared In

ADKCamera.h

– initCameraWithDelegate:quality:position:

Initializing a camera instance for shooting photos. Please set your required settings at the beginning.

- (instancetype)initCameraWithDelegate:(id)delegate quality:(NSString *)cameraQuality position:(ADKCameraPosition)cameraPosition

Parameters

delegate

Assigning a delegate target to handle camera’s response. Please refer ADKCameraDelegate protocol to know what methods you can implement.

cameraQuality

Assigning camera quality in camera instance. This values should be the same with sessionPreset in AVCaptureSession.

cameraPosition

Assigning camera position in ADKCameraPosition. It will help you to set up first camera sensor for you.

Return Value

Instance of ADKCamera that you can use it to make your own customized camera feature. (Making photo only)

Declared In

ADKCamera.h

– initCamcoderWithDelegate:quality:position:

Initializing a camera instance for shooting photos and recording video simultaneously. Please set your required settings at the beginning.

- (instancetype)initCamcoderWithDelegate:(id)delegate quality:(NSString *)cameraQuality position:(ADKCameraPosition)cameraPosition

Parameters

delegate

Assigning a delegate target to handle camera’s response. Please refer ADKCameraDelegate protocol to know what methods you can implement.

cameraQuality

Assigning camera quality in camera instance. This values should be the same with sessionPreset in AVCaptureSession.

cameraPosition

Assigning camera position in ADKCameraPosition. It will help you to set up first camera sensor for you.

Return Value

Instance of ADKCamera that you can use it to make your own customized camera feature.

Declared In

ADKCamera.h

– optimizeForHighestFrameRate

Optimizing camera for getting highest frame rate. If you want to get the fastest camera response, you can use this method to achieve your purpose.

- (void)optimizeForHighestFrameRate

Declared In

ADKCamera.h

– flashAvailable

Checking for capability of using flash feature on your camera. If it return YES means current device has this sensor and you can use it. When it return NO, it means current device might be not exist or have no capability to use it.

- (BOOL)flashAvailable

Return Value

Flash available status in BOOL value.

Declared In

ADKCamera.h

– torchAvailable

Checking for capability of using torch feature on your camera. If it return YES means current device has this sensor and you can use it. When it return NO, it means current device might be not exist or have no capability to use it.

- (BOOL)torchAvailable

Return Value

Torch available status in BOOL value.

Declared In

ADKCamera.h

– focusAtPoint:

Using camera to take focus on your target. The focus point’s format should be CGPoint.

- (void)focusAtPoint:(CGPoint)focusPoint

Parameters

focusPoint

Assigning a CGPoint to make a focus point on your camera. The value should between (0, 0) and (1, 1). If you want to convert screen coordiniate into required coordinate, the captureDevicePointOfInterestForPointmethodin AVCaptureVideoPreviewLayer can satisfy your requirement.

Declared In

ADKCamera.h

– exposureAtPoint:

Using camera to take exposure on your target. The exposure point’s format should be CGPoint.

- (void)exposureAtPoint:(CGPoint)exposurePoint

Parameters

exposurePoint

Assigning a CGPoint to make a exposure point on your camera. The value should between (0, 0) and (1, 1). If you want to convert screen coordiniate into required coordinate, the captureDevicePointOfInterestForPointmethodin AVCaptureVideoPreviewLayer can satisfy your requirement.

Declared In

ADKCamera.h

– startCamera

Asking camera to start it’s mechanism for shooting photos or recording videos. For performance issue, I suggest you should stop camera when you don’t need it and recover it by calling startCamera method. For example, presenting modal view to cover camera view, pushing app to background , transferring into other view and etc.

- (void)startCamera

Declared In

ADKCamera.h

– stopCamera

Asking camera to stop it’s mechanism for shooting photos or recording videos. For performance issue, I suggest you should stop camera when you don’t need it and recover it by calling startCamera method. For example, presenting modal view to cover camera view, pushing app to background , transferring into other view and etc.

- (void)stopCamera

Declared In

ADKCamera.h

– captureImage:

@brief

- (void)captureImage:(void ( ^ ) ( UIImage *image , NSDictionary *exifDic , NSError *error ))completionBlock

Discussion

@brief

@param completionBlock

Declared In

ADKCamera.h

– startCaptureVideo:outputURL:

Asking camera start to make video recording. The error handler and response handler will be satisfy in this method.

- (void)startCaptureVideo:(void ( ^ ) ( NSURL *videoOutputURL , NSError *error ))completionBlock outputURL:(NSURL *)videoOutputURL

Parameters

completionBlock

The block that you handle error and response behavior. If error parameter is not nil, it means something wrong when you record. Please read error code to understand what happen to it. It also return videoOutputURL to tell you where video recording file is.

videoOutputURL

Assigning a video output url with NSURL data type. The camera will record video and save it to this url path.

Declared In

ADKCamera.h

– stopCaptureVideo

Asking camera to terminate video recording. After you stop capture video, you could get a video file url that camera recorded.

- (void)stopCaptureVideo

Declared In

ADKCamera.h