General Properties

Description

This class displays the video and controls the camera, inheriting UIView. It supports real-time document detection, capturing images and documents.

Members

Member Type Member Name Description
Property DcsViewEnum nextViewAfterCancel Gets or sets the view to navigate to when the cancel tool item is tapped. The default value is DEV_IMAGEGALLERYVIEW.
Property DcsViewEnum nextViewAfterCapture Gets or sets the view to navigate to when the capture tool item is tapped. The default value is DEV_VIDEOVIEW.
Property DcsModeEnum mode Gets or sets the view mode. The default is DME_IMAGE.
Property DcsCameraPositionEnum cameraPosition Gets or sets the current camera position. The default is DCPE_BACK.
Property BOOL ifAllowDocumentCaptureWhenNotDetected Gets or sets whether to disable document capture function when no document is detected. The default value is NO.

typedef enum DcsViewEnum

DVE_VIDEOVIEW=0x0010 Video view
DVE_IMAGEGALLERYVIEW Image gallery view
DVE_EDITORVIEW Edit view. When the data you operate with is a document, it displays the document editor. If it's an image, then it displays the image editor.
(nonatomic, assign) DcsViewEnum nextViewAfterCancel
Description Gets or sets the view to navigate to when the cancel tool item is tapped. The default value is DEV_IMAGEGALLERYVIEW.
Remarks If it's set to DVE_VIDEOVIEW, when the cancel button is clicked, the current view remains the same.

If it's set to DVE_IMAGEGALLERYVIEW, when the cancel button on the video view is clicked, the current view redirects to the image gallery view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_IMAGE, when the cancel button on the video view is clicked, the current view redirects to the image editor view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_DOCUMENT, when the cancel button on the video view is clicked, the current view redirects to the document editor view.

If it's not set to DVE_VIDEOVIEW, DVE_IMAGEGALLERYVIEW or DVE_EDITORVIEW, the exception DcsValueOutOfRangeException will be thrown.

If the value equals nil, it means the set fails, the exception DcsValueOutOfRangeException will be thrown.

(nonatomic, assign) DcsViewEnum nextViewAfterCapture
Description Gets or sets the view to navigate to when the capture tool item is tapped. The default value is DEV_VIDEOVIEW.
Remarks If it's set to DVE_VIDEOVIEW, when the capture button is clicked, the current view remains the same.

If it's set to DVE_IMAGEGALLERYVIEW, when the capture button on the video view is clicked, the current view redirects to the image gallery view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_IMAGE, when the capture button on the video view is clicked, the current view redirects to the image editor view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_DOCUMENT, when the capture button on the video view is clicked, the current view redirects to the document editor view.

If it's not set to DVE_VIDEOVIEW, DVE_IMAGEGALLERYVIEW or DVE_EDITORVIEW, the exception DcsValueOutOfRangeException will be thrown.

If the value equals nil, it means the set fails, the exception DcsValueOutOfRangeException will be thrown.

typedef enum DcsModeEnum

DME_IMAGE Displays the video stream and captures images.
DME_DOCUMENT Displays the video stream, detects documents in real time and captures documents.
(nonatomic, assign) DcsModeEnum mode
Description Gets or sets the view mode. The default is DME_IMAGE.
Remarks If it is set to DME_DOCUMENT, it will detect documents in real time and draw the boundaries of documents according to the value of property documentBoundaryColor and documentBoundaryThickness. When a document is detected, the event onDocumentDetected will be fired.

If the value is neither DME_DOCUMENT nor DME_IMAGE, the exception DcsValueOutOfRangeException will be thrown.

typedef enum DcsCameraPositionEnum

DCPE_BACK=0x0010 Back camera
DCPE_FRONT Front camera
(nonatomic, assign) DcsCameraPositionEnum cameraPosition
Description Gets or sets the current camera position. The default is DCPE_BACK.
Remarks If the value is neither DCPE_BACK nor DCPE_FRONT, the exception DcsValueOutOfRangeException will be thrown.
(nonatomic, assign) BOOL ifAllowDocumentCaptureWhenNotDetected
Description Gets or sets whether to disable document capture function when no document is detected. The default value is NO.
Remarks When ifAllowDocumentCaptureWhenNotDetected is NO, you can’t capture documents when no document is detected. If you try to call captureDocument() or click the capture tool item on the UI to capture documents in that case, the event onCaptureFailure will be fired and the exception DcsDocumentNotDetectedException will be received.
Is this page helpful?