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

Preview flattened when in container #40

Closed
jeryRazakarison opened this issue Jun 15, 2017 · 3 comments
Closed

Preview flattened when in container #40

jeryRazakarison opened this issue Jun 15, 2017 · 3 comments

Comments

@jeryRazakarison
Copy link
Contributor

Hi,

I would like to put the BarcodeScannerController inside a ContainerView (in order to have the Barcode scanner on the top half of the screen, and a tableview with the list of scanned barcode on the bottom half of the screen).

But when I tries to embed the BarcodeScannerController in a container which sizes the half of the height of the screen, the preview is flattened. Do anyone have an idea of how to fix it?

Thank you a lot,

Jery

@Metric
Copy link

Metric commented Jun 20, 2017

This would be due line 179 in the controller: videoPreviewLayer?.videoGravity = AVLayerVideoGravityResize;

It should be: videoPreviewLayer?.videoGravity = AVLayerVideoGravityResizeAspectFill;

@jeryRazakarison
Copy link
Contributor Author

Oh, yes! Thank you for pointing this. Do you intend to do a PR, or do you want me to do it?

@vadymmarkov
Copy link
Contributor

Fixed #41

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