Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/netyouli/whc_qrcodescan
封装系统和ZXingObjc 二维码扫描,相册图片二维码识别,二维码生成,swift版和oc版
https://github.com/netyouli/whc_qrcodescan
Last synced: about 1 month ago
JSON representation
封装系统和ZXingObjc 二维码扫描,相册图片二维码识别,二维码生成,swift版和oc版
- Host: GitHub
- URL: https://github.com/netyouli/whc_qrcodescan
- Owner: netyouli
- Created: 2015-12-30T03:58:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-30T04:43:32.000Z (about 9 years ago)
- Last Synced: 2023-03-01T16:55:59.180Z (almost 2 years ago)
- Language: Objective-C
- Size: 606 KB
- Stars: 27
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WHC_QRCodeScan
## 作者:吴海超
## 联系qq:712641411##封装系统扫描二维码API和ZXingObjc开源扫码库 二维码扫描,相册图片二维码识别,二维码生成,开源swift版和oc版
###OC版使用例子(swift版请自行参考代码)
```objective-c
/// 开始扫描二维码
- (IBAction)clickStart:(id)sender {
WHC_QRCodeVC * vc = [WHC_QRCodeVC new];
/// 扫描二维码代理
vc.delegate = self;
/// 生成二维码图片地址
vc.myQRCodeUrl = @"https://github.com/netyouli?tab=repositories";
[self presentViewController:vc animated:YES completion:nil];
}#pragma mark - WHC_QRCodeVCDelegate
/// 扫描二维码回调
- (void)WHCQRCodeVCScanCallBack:(NSString *)value isQRCode:(BOOL)isQRCode {
if (isQRCode) {
QRCodeWebVC * vc = [QRCodeWebVC new];
vc.value = value;
[self presentViewController:vc animated:YES completion:nil];
}else {
[[[UIAlertView alloc] initWithTitle:value
message:nil
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil,
nil] show];
}
}/// 生成二维码图片回调
- (void)WHCQRCodeVCBecomeQRCodeImage:(UIImage *)image {
MyQRCodeVC * vc = [MyQRCodeVC new];
vc.myQRCodeImage = image;
[self presentViewController:vc animated:YES completion:nil];
}```
##运行效果
![image](https://github.com/netyouli/WHC_QRCodeScan/blob/master/qrcode.png)