Private Sub Button1_Click
Dim NativeMe As NativeObject = Me
NativeMe.RunMethod("createQR417::", Array ("Your text",ImageView1))
End Sub
#If OBJC
- (void)createQR417:(NSString *)qrString :(UIImageView *)qrImageView
{
// Need To convert the string To a UTF-8 encoded NSData object
NSData *stringData = [qrString dataUsingEncoding: NSISOLatin1StringEncoding];
// Create the filter
CIFilter *qrFilter = [CIFilter filterWithName:@"CIPDF417BarcodeGenerator"];
// Set the message content And error-correction level
[qrFilter setValue:stringData forKey:@"inputMessage"];
[qrFilter setValue:@"M" forKey:@"inputCorrectionLevel"];
// Remove blur effect with scaling
CGAffineTransform transform = CGAffineTransformMakeScale(100.0f,100.0f);
CIImage *qrOutput = [qrFilter.outputImage imageByApplyingTransform: transform];
//Convert CIImage to UIImage
UIImage *qrImage = [[UIImage alloc] initWithCIImage:qrOutput];
//Set Image to ImageView
[qrImageView setImage:qrImage];
}
#End If