BarcodeView
BarcodeView copied to clipboard
Interface Orientation
Awesome work Mike! This is an excellent module that I'm using in one of my projects.
Now I'm trying to use the landscape mode of the ZBarReaderView instead of transforming the view in the appcelerator side (rotation)
Here's what I'm trying in ComMfoggBarcodeView.m without success:
-(NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
-(BOOL)shouldAutorotate {
return YES;
}
-(void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation
duration: (NSTimeInterval)duration;
{
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
[self square].previewTransform = CGAffineTransformMakeRotation(M_PI_2);
} else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) {
[self square].previewTransform = CGAffineTransformMakeRotation(-M_PI_2);
} else if (toInterfaceOrientation== UIInterfaceOrientationPortraitUpsideDown) {
[self square].previewTransform = CGAffineTransformMakeRotation(M_PI);
} else {
[self square].previewTransform = CGAffineTransformIdentity;
}
}
I really appreciate any help you can provide.
Hi , did you got any solution?