iOS : Zxing QR Code Reader in ipad not working in landscape orientation -
i working on landscape only ipad app , trying integrate zxing qr code scanner library project. able integrate library, , run without compiler errors.
issues
- even though application landscape, zxing camera view showing portrait.
- i not able scan using library. don't know whether camera layer showing in different orientation reason it.
my project setup
- ipad landscape application
- target sdk : ios 6.1
- deployment target : ios 6.0 or above
- zxing version : 2.1
- testing on : ipad 2, ios 6.1
my code
well, code simple, calling zxingwidgetcontroller
homeviewcontroller
, implemented delegate methods.. delegates never getting fired.
homeviewcontroller.h
@interface homeviewcontroller : uiviewcontroller<zxingdelegate>{ } @end
homeviewcontroller.m
-(void) opencamerascanner{ zxingwidgetcontroller *ctrller = [[zxingwidgetcontroller alloc] initwithdelegate:self showcancel:yes onedmode:no]; ctrller.delegate = self; [self presentviewcontroller:ctrller animated:yes completion:nil]; } - (void)zxingcontroller:(zxingwidgetcontroller *)controller didscanresult:(nsstring *)reslt{ [self showdismissivealertwithmessage:[nsstring stringwithformat:@"qr code read : %@ ", reslt]]; } - (void)zxingcontrollerdidcancel:(zxingwidgetcontroller *)controller{ [self showdismissivealertwithmessage:@"failed read qr code"]; }
well, if question not clear enough, scaled down version of landscape app portrait looking zxing..
the widget never designed rotation , i'm not quite sure does. it's possible zxing getting distorted/badly cropped stream of images avff because of rotation. handling different orientations error-prone when dealing avff.
there interface zxing ios/os x in objc directory. it's lower level (the calayer level). makes integrating more work makes handling rotations (more) feasible. doesn't magic rotations: still have place , transform layers , fundamentally tricky.
Comments
Post a Comment