掃描二維碼:
下載點擊打開鏈接 然後直接調用即可。
-(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];
};
}