Cannot overload .generate() with all parameters
cdeck95 opened this issue · comments
Xcode Version: 9.4.1
Swift Version: 4.1
Podfile depenency: pod "EFQRCode", '~> 4.2.2'
Problem: Unable to overload the code below with the following parameters:
- Magnification
- Mode
- InputCorrectionLevel
- Icon
- Transparency
- Binariazation
- Point Shape
Error given when trying to overload the generate method:
Incorrect argument label in call (have 'content:mode:foregroundColor:watermark:', expected 'content:size:foregroundColor:watermark:')
Code used:
if let tryImage = EFQRCode.generate(
content: qrCodeString,
// backgroundColor: Color.coral.value.cgColor,
mode: EFQRCodeMode.binarization
foregroundColor: Color.bondiBlue.value.cgColor,
watermark: UIImage(named: "Logo-1.png")?.toCGImage()
) {
print("Create QRCode image success: \(tryImage)")
return UIImage(cgImage: tryImage)
} else {
print("Create QRCode image failed!")
return nil
}
Can you overload the generate method with more than just the base params? I also tried using the second option to initialize the code generator but got a different error. I do not want to throw multiple issues into one post but I felt that it was important to note why I am trying to overload the method rather than trying the other way.
hi
have you solved this?
seems like the generator function doesn't have icon has param