Re: I want to change the overlay view to landscape when the camera is turned on in objective C

Skip to first unread message

Steven Parkes

Apr 6, 2013, 7:27:12 PM4/6/13
to Dhara,
Your probably on your own. The widget isn't designed to be used on non-iphone devices or in other than portrait orientation. Handling rotations is subtly difficult.

On Mar 3, 2013, at 1:42 AM, Dhara <> wrote:

> Hi i am using zxing sdk its working superb. But i have an issue i want the app to run in landscape orientation when the camera is on i mean when scanning is going on. How can i achieve this in objective c.
> widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:NO OneDMode:YES showLicense:NO];
> QRCodeReader* qrcodeReader = [[QRCodeReader alloc] init];
> NSSet *readers = [[NSSet alloc ] initWithObjects:qrcodeReader,nil];
> [qrcodeReader release];
> widController.readers = readers;
> [readers release];
> NSBundle *mainBundle = [NSBundle mainBundle];
> widController.soundToPlay =
> [NSURL fileURLWithPath:[mainBundle pathForResource:@"beep-beep" ofType:@"aiff"] isDirectory:NO];
> [self presentModalViewController:widController animated:YES];
> //[widController release];
> [[UIDevice currentDevice] performSelector:@selector(setOrientation:) withObject:(id)UIDeviceOrientationLandscapeRight];
> --
> ---
> You received this message because you are subscribed to the Google Groups "zxing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> For more options, visit

Reply all
Reply to author
0 new messages