I have been stuck on this problem for a while now. I am developing an app on the new iPad that uses Zbar and I would like to add a custom overlay to the ZBarReaderViewController. But it does not seem to show up no matter what i try. I have followed the tutorial at http://zbar.sourceforge.net/iphone/sdkdoc/tutorial.html.
Hello,
I have been stuck on this problem for a while now. I am developing an app on the new iPad that uses Zbar and I would like to add a custom overlay to the ZBarReaderViewController. But it does not seem to show up no matter what i try. I have followed the tutorial at http://zbar.sourceforge.net/iphone/sdkdoc/tutorial.html.
The following is a code snippet:
I am not sure what could be the problem. If anyone has any idea at all, please feel free to share it with me. Any help would be well appreciated.
Thanks!
Hi!
This is maybe too late, but hopefully help others:
You have to modify ZBarReaderController.h like this:
/*
ZBarOrientationMask(UIInterfaceOrientationPortrait) | \
ZBarOrientationMask(UIInterfaceOrientationPortraitUpsideDown) | \
*/
// orientation set support
#define ZBarOrientationMask(orient) (1 << orient)
#define ZBarOrientationMaskAll \
(ZBarOrientationMask(UIInterfaceOrientationLandscapeLeft) | \
ZBarOrientationMask(UIInterfaceOrientationLandscapeRight))
Greetings!
erm… okay, wrong anser, but … erm… sorry for that ;D
BUT:
if(reader == nil) {
reader = ;
reader.readerDelegate = self;
reader.showsZBarControls = FALSE;
reader.tracksSymbols = FALSE;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
if(customView == nil) {
customView = ;
customView.delegate = self;
}
reader.tracksSymbols = 1;
reader.cameraOverlayView = customView.view;
}
UIApplication *thisApp = ;
thisApp.idleTimerDisabled = TRUE;
NSNumber *flashModeBool = ;
reader.cameraFlashMode = ;
NSLog(@"flashModeBool = %@",flashModeBool);
;
works fine for me ;)