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

  1. even though application landscape, zxing camera view showing portrait.
  2. i not able scan using library. don't know whether camera layer showing in different orientation reason it.

my project setup

  1. ipad landscape application
  2. target sdk : ios 6.1
  3. deployment target : ios 6.0 or above
  4. zxing version : 2.1
  5. 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..

enter image description here

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

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -