问题
I cannot initialize CIDetector for reading QRCOde , It always remains nil. Here is my code :
let options = [CIDetectorAccuracy: CIDetectorAccuracyHigh]
self.detector = CIDetector(ofType: CIDetectorTypeQRCode, context: nil, options: options)
If I replace CIDetectorTypeQRCode
with CIDetectorTypeRectangle
it get initialized but I need to read QRCode
I am trying from last two days, Please help
回答1:
Finally got that working:
Follow the steps:
- Select XcodeProject
- Select Target
- Select BuildSettings
- Make Sure ValidArchitecture have arm64 or replace it with (arm64 armv7 armv7s)
来源:https://stackoverflow.com/questions/35885137/cidetctor-always-remains-nil-cant-read-qrcode