Reputation: 8434
I have downloaded a sample code from github for QRCode encoding.
It works fine and generates an image with QRCode for string that I specified.
But, when I scan that image, it displays the string like http://mystring
.
I need only mystring
. How to do that? Is the problem is with QRscanner app?
I think the QRencoderapp is about encoding an url.
Is there any other sample to encode just a simple string (not url)?
or
Is there any changes to be done get the string instead of url in the above code?
Upvotes: 3
Views: 1494
Reputation: 8434
I 've solved my problem.
I downloaded a project from this Github link.
The code in that prjct creates a QRCode image for a simple text.
NSString *code = @"Our String to be encoded";
Barcode *barcode = [[Barcode alloc] init];
self.view.backgroundColor = [UIColor whiteColor];
[barcode setupQRCode:code];
ourImageView.image = barcode.qRBarcode;
Hope, this will help others.
Upvotes: 3