How to generate QR code in iPhone?

2019-01-22 09:56发布

How to Generate QR Code from iPhone with Password protection?. I should generate QR code for given Image with Password protection. When read it from iPhone

4条回答
小情绪 Triste *
2楼-- · 2019-01-22 10:04

I have found one very simple way how to generate QR Code using Google Api.Just take 1 UIWebView in your code I have taken IBOutlet UIWebView *webView; and I want add this Much of Information in My QR Code. 1.Business Name 2.First Name and Last Name 3.Physical Address and phone 4.Website

NSString *url=[NSString stringWithFormat:@"http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=MECARD:ORG%@CN%@%@CTEL%@CADR%@%@%@%@%@CEMAIL%@",[d valueForKey:@"QR Business Name"],[d valueForKey:@"QR First Name"],[d valueForKey:@"QR Last Name"],[d valueForKey:@"QR Phone"],[d valueForKey:@"QR Physical Address"],[d valueForKey:@"QR Physical City"],[d valueForKey:@"QR Physical State"],[d valueForKey:@"QR Physical Zip"],[d valueForKey:@"QR Physical Zip Plus 4"],[d valueForKey:@"QR Website"]];

url=[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

//Create a URL object.
NSURL *Curl=[NSURL URLWithString:url];
//URL Requst Object
NSURLRequest *request = [NSURLRequest requestWithURL:Curl];
//Load the request in the UIWebView.
[webView loadRequest:request];
查看更多
何必那么认真
3楼-- · 2019-01-22 10:07

You can try https://github.com/myang-git/QR-Code-Encoder-for-Objective-C. Recently I added the ability to encrypt/decrypt by AES

查看更多
Lonely孤独者°
4楼-- · 2019-01-22 10:21

You can use this framework : onbarcode or zxing

查看更多
爷的心禁止访问
5楼-- · 2019-01-22 10:28

Now with iOS 7 it can be done directly without additional libraries. There's an excellent example at https://github.com/shu223/iOS7-Sampler

查看更多
登录 后发表回答