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