iOS 掃描二維碼功能開發方法 – iPhone手機開發 iPhone軟體開發教學課程

掃描二維碼:

下載點擊打開鏈接 然後直接調用即可。

-(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];

};

}

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *