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> delegateDeclared 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> liveVideoDataDlegateDeclared 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 alignDeviceOrientationDeclared 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 trackLiveVideoDataDeclared 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 *cameraQualityDeclared 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 cameraPositionDeclared 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 cameraFlashModeDeclared 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 cameraTorchModeDeclared 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 cameraMirrorModeDeclared 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 cameraFocusModeDeclared 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 cameraExposureModeDeclared 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 cameraWhiteBlanceModeDeclared 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 *captureVideoPreviewLayerDeclared 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 recordingDeclared In
ADKCamera.h
minExposureBias
The minimum value of exposure bias. Please keep exposure bias value bigger than this value.
@property (assign, readonly, nonatomic) CGFloat minExposureBiasDeclared In
ADKCamera.h
maxExposureBias
The maximum value of exposure bias. Please keep exposure bias value less than this value.
@property (assign, readonly, nonatomic) CGFloat maxExposureBiasDeclared 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 exposureBiasDeclared 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 minShutterSpeedDeclared 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 maxShutterSpeedDeclared 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 shutterSpeedDeclared 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 ISODeclared 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 minZoomFactorDeclared 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 maxZoomFactorDeclared 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 zoomFactorDeclared 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 minLensPositionDeclared 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 maxLensPositionDeclared 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 lensPositionDeclared 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 minWhiteBalanceTemperatureDeclared 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 maxWhiteBalanceTemperatureDeclared 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 whiteBalanceTemperatureDeclared 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 minWhiteBalanceTintDeclared 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 maxWhiteBalanceTintDeclared 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 whiteBalanceTintDeclared 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 lowLightBoostDeclared 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 stabilizationDeclared 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)cameraPermissionReturn 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)microphonePermissionReturn 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)frontCameraAvailableReturn 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)rearCameraAvailableReturn 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)cameraPositionParameters
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)cameraPositionParameters
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)optimizeForHighestFrameRateDeclared 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)flashAvailableReturn 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)torchAvailableReturn 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)focusPointParameters
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)exposurePointParameters
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)startCameraDeclared 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)stopCameraDeclared In
ADKCamera.h
– captureImage:
@brief
- (void)captureImage:(void ( ^ ) ( UIImage *image , NSDictionary *exifDic , NSError *error ))completionBlockDiscussion
@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 *)videoOutputURLParameters
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)stopCaptureVideoDeclared In
ADKCamera.h