将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")
}
}
}
}