Closed mitti2000 closed 5 years ago
Through an answer from Lucas Zhang and ColeX I found the problem:
Cause: I put the ZXingScannerView and ZXingDefaultOverlay in the same cell of grid .Then I set the HorizontalOptions of ZXingScannerView as EndAndExpand .
Solution: HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
Hi there
We have a problem with the ZXing Barcodescanner for Xamarin.Forms and I thought somebody here might be able to help. The scanner works perfectly on Android, but on IOS I can't see the camera image (preview). The scanner does scan barcodes on IOS if I hold them in front of the camera but the camera preview is just a white background. I tried playing around with the options but without luck. We are using Prism.Forms for MVVM.
As I mentioned, my code works well on android. Here are some details:
Here is our code (View and view model):
ScannerView.xaml
ScannerViewModel.cs
Does anyone see an issue at my code or has some suggestions on how to do it better or at least get it to work? This is our first Xamarin.Forms app so I would really appreciate the help.
Here is a link to my repo to reproduce the problem: https://gitlab.com/mitti2000/zxingtest
Thank you so much, Regards mitti2000