onCancelTapped

Description

The event is fired when the cancel tool item is clicked.

Syntax

func onCancelTapped(sender:Any)

Parameters

sender:Any The current DcsUIVideoView object that triggers the event.

Return value

Void

Example

class ViewController: UIViewController, DcsUIVideoViewDelegate {
    var dcsView:DcsView!
    override func viewDidLoad() {
        super.viewDidLoad()
        dcsView = DcsView(frame: CGRect(x:0,y:0,width:self.view.frame.size.width,height:self.view.frame.size.height))
        dcsView.videoView.delegate = self
        view.addSubview(dcsView)
    }
    func onDocumentDetected(_ sender: Any!, document: DcsDocument!) {
        print("Document is detected")
    }
    func onCancelTapped(_ sender: Any!) {
        print("Cancel is tapped")
    }
    func onCaptureTapped(_ sender: Any!) {
        print("Capture is tapped")
    }
    func onPreCapture(_ sender: Any!) -> Bool {
        print("This event is fired before capture")
        //If false is returned, the capture action will be cancelled.
        return true
    }
    func onPostCapture(_ sender: Any!) {
        print("This event is fired after capture")
    }
    func onCaptureFailure(_ sender: Any!, exception: DcsException!) {
        print("Capture failed")
    }
}
Is this page helpful?

Leave a Reply

Your email address will not be published.