ZXingWidgetController 加载时显示空白屏幕
我使用的是 Xcode 4.1,在 iOS Simulator 4.3 上,
我已按照自述文件中的说明将 ZXing 库导入到我的项目中。
当我尝试加载控制器时,我看到的只是一个白色屏幕,底部有一个“取消”按钮。我知道模拟器无法拍照,但控制器应该让您从照片库中选择要解码的图像。有人遇到过这个问题或者对造成这个问题的原因有任何想法吗?
ZXingWidgetController *widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES OneDMode:NO];
QRCodeReader* qrcodeReader = [[QRCodeReader alloc] init];
NSSet *readers = [[NSSet alloc ] initWithObjects:qrcodeReader,nil];
[qrcodeReader release];
widController.readers = readers;
[readers release];
[self presentModalViewController:widController animated:YES];
[widController release];
编辑:忘了提及,模拟器上有我已经加载的图片。
I am using Xcode 4.1, on iOS Simulator 4.3
I have imported the ZXing library into my project as per the instructions in their README.
When I try to load the controller all I see is a white screen with a Cancel button at the bottom. I know the simulator can't take photos but the controller is then supposed to let you choose an image to decode from the photo library. Has anyone had this issue or has any ideas on what is causing it?
ZXingWidgetController *widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES OneDMode:NO];
QRCodeReader* qrcodeReader = [[QRCodeReader alloc] init];
NSSet *readers = [[NSSet alloc ] initWithObjects:qrcodeReader,nil];
[qrcodeReader release];
widController.readers = readers;
[readers release];
[self presentModalViewController:widController animated:YES];
[widController release];
EDIT: Forgot to mention, there are pictures on the simulator that I loaded already.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在哪里看到这个?它不在
README
或代码中。该小部件不提供图像选择器备份。旧的 Barcodes 应用程序(位于
cpp/iphone/legacy/Barcodes_original
)可以,但当前的 Barcodes 应用程序不能。如果您需要这个,您必须自己实现。在某种程度上,旧的条形码应用程序可能可以作为指南。Where did you see this? It's not in the
README
or the code.The widget doesn't provide an image picker backup. The old Barcodes app (found in
cpp/iphone/legacy/Barcodes_original
) did but the current Barcodes app doesn't. If you need this, you'll have to implement it yourself. The old Barcodes app might be useful as guide, to some extent.