let detector:CIDetector=CIDetector(ofType: CIDetectorTypeQRCode, context: nil, options: [CIDetectorAccuracy:CIDetectorAccuracyHigh])!
它工作正常,在设备,但生成构建的iTunes分发时,它提供错误:CIDetectorTypeQRCode给出错误
"Value of type '[String:AnyObject]?" has no member 'Key'
如果我删除选项部分
[CIDetectorAccuracy:CIDetectorAccuracyHigh]
然后它给错误,如:
(ofType: String, context: CIContext?, options: [String : AnyObject]?) -> CIDetector' is not convertible to '(ofType: String, context: CIContext?, options: [String : AnyObject]?) -> CIDetector?'
有人对此有所了解吗?
我使用的是Swift 2.3和Xcode 8.1。
这也适用于我,我根本不明白... –
非常有趣的技巧,它也解决了我的问题。 – bubuxu