Skip to content

扫描结果有时候显示不了 #2

Description

@Leo-Lv

if (metadataObjects.count > 0) {
// [self.session stopRunning];
AVMetadataMachineReadableCodeObject * metadataObject = metadataObjects.firstObject;
if (self.returnScanBarCodeValue) {
self.returnScanBarCodeValue(metadataObject.stringValue);
if (self.navigationController) {
[self.navigationController popViewControllerAnimated:YES];
} else {
[self dismissViewControllerAnimated:YES completion:nil];
}
}
}
在调用block之前把session停止了之后扫描得到的值有时候无法在我这边的UI上刷新,注释掉才行,作者可以看看是不是注释掉会更好,ARC情况下dismiss之后这个VC也会自动释放,应该不需要刻意去停止了

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions