我在我的項目中使用QR碼創建項目https://github.com/kuapay/iOS-QR-Code-Generator。我已經完全按照說明添加了它。CGImageCreateWithMaskingColors無匹配函數
我可以編譯和我沒有什麼問題,所以,以往的測試設備上運行該項目,但是當我試圖將其存檔,我得到以下錯誤:
Path/to/project/Barcode.mm:67:33: No matching function for call to 'CGImageCreateWithMaskingColors'
我拉我的頭髮在這一個。這裏是代碼片段,它與它使用的變量聲明一起被調用。
CGImageRef rawImageRef = image.CGImage;
const float colorMasking[6] = {222, 255, 222, 255, 222, 255};
UIGraphicsBeginImageContext(image.size);
CGImageRef maskedImageRef = CGImageCreateWithMaskingColors(rawImageRef, colorMasking);
您是否有一些爲調試而不是發佈構建配置的構建設置? – Wain
**您贏了!** 我沒有爲活動架構而僅在發佈版本上構建,只是調試。 – stevenpaulr