Show scanner
After initialization is completed and the scenario is set, you can start document scanning process:
DocReader.shared.showScanner(self) { (action, result, error) in
switch action {
case .cancel:
print("Cancelled by user")
case .complete:
print("Completed")
guard let result = result else { return }
print("Result class: \(result)")
case .error:
print("Error: \(error)")
case .process:
guard let result = result else { return }
print("Scanning is not finished. Result: \(result)")
}
}
Last updated
Was this helpful?