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

Active Scanning Area #43

Closed
Gerst20051 opened this issue Jan 21, 2016 · 4 comments
Closed

Active Scanning Area #43

Gerst20051 opened this issue Jan 21, 2016 · 4 comments

Comments

@Gerst20051
Copy link

I can't seem to figure out why the barcodes are only scanned when it's in the top half of the camera feed. This is true in portrait and landscape orientation. Is this expected behavior?

@yeahdongcn
Copy link
Owner

The frame of the camera feed takes the bounds of the root view of RSCodeReaderViewController, maybe you should add a print in RSCodeReaderViewController's viewDidLoad()

if let videoPreviewLayer = self.videoPreviewLayer {
    videoPreviewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
    print(self.view.bounds)
    videoPreviewLayer.frame = self.view.bounds
    self.view.layer.addSublayer(videoPreviewLayer)
}

@Gerst20051
Copy link
Author

Hey, I forgot I created this issue but I figured it out. It only scans when it's directly in the center of the screen. I can be anywhere horizontally along the vertical center (equator) of the screen. If you extend the red line all the way to the edges of the screen.

img_7673

@dbpfindexp
Copy link

@Gerst20051 how did you get the scanning area guides to display? I would like to add something similar to help users understand the scan area.

@Gerst20051
Copy link
Author

The scan area is the horizontal red line. you can create them yourself.

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

3 participants