Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

扫描区域调整无效 #188

Open
weiqiangcai opened this issue Jul 11, 2024 · 1 comment
Open

扫描区域调整无效 #188

weiqiangcai opened this issue Jul 11, 2024 · 1 comment

Comments

@weiqiangcai
Copy link

修改scanFrame 设置frame后,扫码的位置不在框内,在框外

@weiqiangcai
Copy link
Author

加个这个更方便
scanCode.rectOfInterest = [self convertRectOfInterest:CGRectMake()] ;
// 将 rect 转换为 rectOfInterest

  • (CGRect)convertRectOfInterest:(CGRect)rect {
    CGSize size = self.view.bounds.size;
    return CGRectMake(rect.origin.y / size.height,
    rect.origin.x / size.width,
    rect.size.height / size.height,
    rect.size.width / size.width);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant