ios - 为 VNDocumentCameraViewController Swift 保存按下的操作
问题描述
只是想知道是否有人知道如何在用户按下 VNDocumentCameraViewController 中的保存按钮时添加操作。我只希望用户只能扫描一个文档,然后视图应该自行关闭。
我现在有这个功能...
@objc func scanDocument() {
let scannerViewController = VNDocumentCameraViewController()
scannerViewController.delegate = self
present(scannerViewController, animated: true)
}
除了两个动作,它们的格式都像......
func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFinishWith scan: VNDocumentCameraScan) {
}
但是对于“DidPressSave”或类似的东西,似乎没有相同格式的操作,只有“didFailWithError”。我什至跳到定义,发现他们只有这两个。所以想知道是否有这种方法可以添加这种操作或将用户限制为仅一次扫描?
谢谢,乔丹。
解决方案
目前无法设置要扫描的页数限制。
您可以在VNDocumentCameraViewController类和委托VNDocumentCameraViewControllerDelegate的文档中看到它。
如果您愿意,可以尝试使用WeScan
推荐阅读
- ruby - 如何使用 ruby event_store_client 发布事件?
- hangfire - 即使收到心跳,Hangfire 也找不到应用程序文件
- javascript - 反应粘性:空包装器元素类名
- android - Azure 空间锚点
- git - Git想要从一个文件夹中添加所有未跟踪的repos
- android - configChanges 设置为 0xFFFFFFFF
- mysql - MySQL - 为什么限制 varchar
- vis.js - 如何在 vis.js 中用图像绘制边缘
- c# - 如何将初始容量设置为 SortedDictionary?
- python - 沃尔玛刮板被阻塞