With Dynamsoft Camera SDK iOS Edition, you can easily implement the built-in video view in your app. The built-in video view has the capability of real-time document detection, auto cropping the detected documents, capturing images, etc.
How to enable document detection in a video stream
By default, the document detection function is not turned on. You need to enable it by setting mode to DME_DOCUMENT.
self.dcsView.videoView.mode = DME_DOCUMENT;
As you can see, there are built-in icons for capturing images or documents, controlling flash and camera position. The capture function is built into the capture icon, so you don't even need to call capture methods captureImage() or captureDocument().
How to set Next View
The default view after clicking the capture button is the video view, but you can set the property nextViewAfterCapture to the image gallery view or edit view.
self.dcsView.videoView.nextViewAfterCapture = DVE_IMAGEGALLERYVIEW; //Set next view to DVE_IMAGEGALLERYVIEW after the Capture icon is clicked. self.dcsView.videoView.nextViewAfterCancel = DEV_IMAGEGALLERYVIEW; //Set next view to DVE_IMAGEGALLERYVIEW after the Cancel icon is clicked.