I am trying to generate a QR code that has a logo in the middle, as it is: .
I am using a code I found here, my code is:
func generateQrCode(message: String!) -> CIImage! {
var data = message.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
var filter: CIFilter = CIFilter(name: "CIQRCodeGenerator")
filter.setValue(data, forKey: "inputMessage")
filter.setValue("H", forKey: "inputCorrectionLevel")
return filter.outputImage
}
How could adapt the code to generate a QR with a custom logo in the middle?