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, capturing the detected documents, capturing images, etc.
How to detect documents in a video stream
By default, the document detection function is turned on.
If you just want to take photos, you can disable it by setting mode to DME_IMAGE.
self.dcsView.videoView.mode = DME_IMAGE;
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.