在Xcode 9 swift 4.0之后的iOS中的Zbar集成问题

时间:2017-10-07 11:27:12

标签: ios swift4 zbar-sdk

将Xcode8升级到Xcode9后,我现有的一些方法显示错误。我无法找到原因。任何人都可以帮忙。这里我附上了我的响应方法和错误消息。在此先感谢

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
    {
        guard let symbolsSet = info[ZBarReaderControllerResults] as? ZBarSymbolSet else { return }

        for symbol in symbolsSet
        {
            if let symbol = symbol as? ZBarSymbol, let data = symbol.data
            {
                let resultString = data
                if resultString.isNumeric { // Validating only numbers with extension # isNumeric
                    text = resultString
                } else {

                    print("Invalid Code")
                }
            }
        }
    }

Type 'ZBarSymbolSet' does not conform to protocol 'Sequence'

0 个答案:

没有答案