标签:二维码
#pragma mark AVCaptureMetadataOutputObjectsDelegate - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection { NSString *stringValue; if ([metadataObjects count] >0) { AVMetadataMachineReadableCodeObject * metadataObject = [metadataObjects objectAtIndex:0]; stringValue = metadataObject.stringValue; _readStr=stringValue; if ([_readStr hasPrefix:@"##px"]) { // NSLog(@"是"); _friend_id = [_readStr substringFromIndex:4]; [self requestHTTPWithNum:1]; } else { // NSLog(@"不是"); UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:_readStr delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil]; [alert show]; } } [_session stopRunning];
标签:二维码
原文地址:http://8287272.blog.51cto.com/8277272/1659554