是否设置ZBar iOS SDK接口方向?
有人知道如何设置ZBar SDK的接口方向吗?我需要它工作在风景,而不是肖像。我尝试添加了是否设置ZBar iOS SDK接口方向?,ios,cocoa-touch,ios5,uiinterfaceorientation,zbar-sdk,Ios,Cocoa Touch,Ios5,Uiinterfaceorientation,Zbar Sdk,有人知道如何设置ZBar SDK的接口方向吗?我需要它工作在风景,而不是肖像。我尝试添加了[阅读器应该自动旋转指针FaceOrientation:UIInterfaceOrientation和scapeRight]但它不起作用。有什么想法吗?我不知道你到底是什么意思,但也许这对你有帮助 [[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft animated:N
[阅读器应该自动旋转指针FaceOrientation:UIInterfaceOrientation和scapeRight]代码>但它不起作用。有什么想法吗?我不知道你到底是什么意思,但也许这对你有帮助
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft animated:NO];
或
我不知道你到底是什么意思,但也许这对你有帮助
[[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeLeft animated:NO];
或
围绕ZBarReaderView创建包装类并添加iOS 6方法:
-(BOOL) shouldAutorotate
{
return NO;
}
-(NSUInteger) supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
然后使用您在内置ZBar one上创建的类,确保在同一控制器中保留旧的iOS 5方法:
- (BOOL)shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscape);
}
而且:
self.reader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationMaskLandscape);
我知道已经很晚了,但我刚刚开始自己为iOS 6做这件事。围绕ZbarReadView创建一个包装类,并添加iOS 6方法:
-(BOOL) shouldAutorotate
{
return NO;
}
-(NSUInteger) supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
然后使用您在内置ZBar one上创建的类,确保在同一控制器中保留旧的iOS 5方法:
- (BOOL)shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscape);
}
而且:
self.reader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationMaskLandscape);
我知道已经很晚了,但我刚刚开始为iOS 6做这件事。我也遇到了同样的问题,并很同情地解决了它
我只需要打电话:
[reader willRotateToInterfaceOrientation: toInterfaceOrientation duration: duration];
在世界范围内。。。包含ZbarReaderView的视图控制器的问题。我也遇到了同样的问题,并解决了它
我只需要打电话:
[reader willRotateToInterfaceOrientation: toInterfaceOrientation duration: duration];
在世界范围内。。。包含ZbarReaderView的视图控制器的