加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

swift – 启动GMVDetector失败

发布时间:2020-12-14 04:56:27 所属栏目:百科 来源:网络整理
导读:我使用以下代码在我的 Swift 3.1项目中使用GoogleMobileVision / Barcode检测器: GMVDetector(ofType: GMVDetectorTypeBarcode,options: nil) 但在日志中显示: 似乎iOS中的GoogleMobileVision是封闭源代码,所以我无法真正看到实现方面发生了什么 关于这里
我使用以下代码在我的 Swift 3.1项目中使用GoogleMobileVision / Barcode检测器:

GMVDetector(ofType: GMVDetectorTypeBarcode,options: nil)

但在日志中显示:

log

似乎iOS中的GoogleMobileVision是封闭源代码,所以我无法真正看到实现方面发生了什么

关于这里可能发生什么的任何想法?

解决方法

我认为你需要设置一些可选的条形码类型值,如EAN13或QRcode而不是nil.

var detector = GMVDetector()
let options:[AnyHashable: Any] = [GMVDetectorBarcodeFormats : GMVDetectorBarcodeFormat.EAN13.rawValue]
self.detector = GMVDetector.init(ofType: GMVDetectorTypeBarcode,options: options)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读