iOS 扫描二维码功能开发方法
程序员文章站
2022-06-30 23:38:51
扫描二维码:
下载点击打开链接 然后直接调用即可。
-(void)scannclick
{
// 扫描二维码
wqcodescanner *scanner = [[wqcodescanner all...
扫描二维码:
下载点击打开链接 然后直接调用即可。
-(void)scannclick
{
// 扫描二维码
wqcodescanner *scanner = [[wqcodescanner alloc] init];
[self presentviewcontroller:scanner animated:yes completion:nil];
scanner.resultblock = ^(nsstring *value) {
// uialertview *alertview = [[uialertview alloc] initwithtitle:value message:@"" delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil];
// [alertview show];
scanncodeviewcontroller * scanncodevc = [[scanncodeviewcontroller alloc] init]; // 获取内容跳转到web页面
scanncodevc.urlstr = value;
[self.navigationcontroller pushviewcontroller:scanncodevc animated:yes];
};
}