Question

I'm using the library ZXing, in particular the object ZXingWidgetController to scan a qr-code. The objected is inserted into a UIPageViewController with 3 pages (the application starts in the second page while the object is in the first one). When i scroll to the first page the camera preview doesn't start, but if i try to return to the second page (without leave the finger, in the same moment when i start the scroll) the preview starts to work. I need to start the camera preview when i scroll up to the first page. Here's my code:

widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:NO OneDMode:NO];

QRCodeReader* qRCodeReader = [[QRCodeReader alloc] init];
NSSet *readers = [[NSSet alloc] initWithObjects:qRCodeReader,nil];
widController.readers = readers;

[self.view addSubview:widController.view];
Was it helpful?

Solution

Solved

ZXingWidgetController insert directly in UIPageViewController. Before it was insert on UIViewController container and then, insert in UIPageViewController.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top