Xamarin.iOS recipe to generate a QR code
This is a sample recipe for the Xamarin Recipe Cook-Off. This sample shows how to generate a QR code and display inside a UIImageView control.
The process to generate a QR code is relatively easy. All that is required is the message you want to encode and setting the error correction level. If you need a bit more information on the error correction levels check the QR code wiki page.
Generate the QR code:
var qrGen = new CIQRCodeGenerator ();
qrGen.Message = NSData.FromString (textField.Text);
qrGen.CorrectionLevel = CorrectionLevel.M.ToString();
Render the image:
var context = CIContext.FromOptions(null);
var img = UIImage.FromImage (context.CreateCGImage (qrGen.OutputImage, qrGen.OutputImage.Extent));
Apple's Documentation:
https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html#//apple_ref/doc/filter/ci/CIQRCodeGenerator