iOS Developer
iOS Developer

Reputation: 1723

Customization of scanning page in zbar application

I am working on an application that scans the QR codes.When the scan button is clicked,it goes to the generic full page camera view.But i need to customize that page so that a logo must be shown at the bottom and a button at the top.the scanning area should be in between these two.How can i implement the?anyone have answer?the code i am using is given below

- (IBAction) scanButtonTapped

{

// ADD: present a barcode reader that scans from the camera feed
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;

ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology: ZBAR_I25
               config: ZBAR_CFG_ENABLE
                   to: 0];
// present and release the controller
[self presentModalViewController: reader
                        animated: YES];
[reader release];

}

Upvotes: 2

Views: 2183

Answers (1)

Vitalii Boiarskyi
Vitalii Boiarskyi

Reputation: 1393

You can set property cameraOverlayView of ZBarReaderViewController. Some docs is here.

 ZBarReaderViewController* reader = [[ZBarReaderViewController alloc] init];
 reader.cameraOverlayView = yourCustomView;

To change tabBar you can add your subview. You can access it using this:

 UIView* subView1 = [reader.view.subviews objectAtIndex:2];
 UIView* tabBar = [subView1.subviews objectAtIndex:0];

Now you can customize tabBar in the way you like.

Upvotes: 3

Related Questions