ZRQRCodeViewController *qrCode = [[ZRQRCodeViewController alloc] initWithScanType:ZRQRCodeScanTypeReturn];
qrCode.qrCodeNavigationTitle = @"扫一扫";
qrCode.errorMessage = @"Access Denied";
[qrCode QRCodeScanningWithViewController:self completion:^(NSString *strValue) {
NSLog(@"strValue = %@ ", strValue);
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:strValue]]){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:strValue]];
} else {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Ooooops!" message:[NSString stringWithFormat:@"The result is %@", strValue] delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil, nil];
[alertView show];
}
} failure:^(NSString *message) {
[[ZRAlertController defaultAlert] alertShowWithTitle:@"Note" message:message okayButton:@"Ok" completion:^{ }];
NSLog(@"Error Message = %@", message);
}];