Reputation: 41
I have issue in setting the camera/scanner in landscape mode, even i change the screen to landscape, but the camera/scanner still appears to be in vertical.
may i know what should be done to fix this ? on the camera APi or should change on the zbar library ?
Thanks.
Upvotes: 1
Views: 670
Reputation: 47
you have to set the orientation mask for the reader:
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
you can edit the mask in ZBarReaderViewController:
// orientation set support
#define ZBarOrientationMask(orient) (1 << orient)
#define ZBarOrientationMaskAll \
(ZBarOrientationMask(UIInterfaceOrientationPortrait) | \
ZBarOrientationMask(UIInterfaceOrientationPortraitUpsideDown) | \
ZBarOrientationMask(UIInterfaceOrientationLandscapeLeft) | \
ZBarOrientationMask(UIInterfaceOrientationLandscapeRight))
Upvotes: 1