【问题标题】:CIDetctor always remains nil, Cant read QRCodeCIDetector 始终为零,无法读取二维码
【发布时间】:2016-03-09 07:07:18
【问题描述】:

我无法初始化 CIDetector 以读取 QRCOde ,它始终保持为零。这是我的代码:

let options = [CIDetectorAccuracy: CIDetectorAccuracyHigh]
            self.detector =  CIDetector(ofType: CIDetectorTypeQRCode, context: nil, options: options)

如果我将CIDetectorTypeQRCode 替换为CIDetectorTypeRectangle,它会被初始化,但我需要读取二维码

前两天正在尝试,请帮忙

【问题讨论】:

    标签: ios swift qr-code core-image cidetector


    【解决方案1】:

    终于搞定了:

    按照以下步骤操作:

    1. 选择 XcodeProject
    2. 选择目标
    3. 选择构建设置
    4. 确保 ValidArchitecture 具有 arm64 或将其替换为 (arm64 armv7 armv7s)

    【讨论】:

    • 请不要发帖duplicate answers。相反,请考虑其他可以帮助未来用户找到所需答案的操作,如链接帖子中所述。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多