Exporing the new VNDocumentCameraViewController I cannot find any delegate or property to set the maximum number of scans.
Does anybody have a workaround or any idea I can implement to limit the number of scans in one go?
Exporing the new VNDocumentCameraViewController I cannot find any delegate or property to set the maximum number of scans.
Does anybody have a workaround or any idea I can implement to limit the number of scans in one go?
On
As of iOS 13 Apple doesn't currently support limiting the scan count.
See VNDocumentCameraViewController for the documentation for the class. The delegate VNDocumentCameraViewControllerDelegate doesn't have anything either.
If you want to use the native scanner your best bet is just picking the first scan once documentCameraViewController(_:didFinishWith:) is called.
Alternatively, you can have a look at WeScan.
All you can do is call
VNDocumentCameraViewControllerDelegateand add this delegate method:In for loop you can add you limit and if the limit exceed you can stop scanning.