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

54 views
Skip to first unread message

Steven Parkes

unread,
Apr 6, 2013, 7:27:12 PM4/6/13
to Dhara, zx...@googlegroups.com
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 <dharab...@gmail.com> 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 zxing+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages