ZXingWidgetController 加载时显示空白屏幕

发布于 2024-12-21 17:27:34 字数 725 浏览 2 评论 0原文

我使用的是 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];

This is what I'm seeing

EDIT: Forgot to mention, there are pictures on the simulator that I loaded already.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半枫 2024-12-28 17:27:34

但是控制器应该让你选择一个图像
从照片库解码

您在哪里看到这个?它不在 README 或代码中。

该小部件不提供图像选择器备份。旧的 Barcodes 应用程序(位于 cpp/iphone/legacy/Barcodes_original)可以,但当前的 Barcodes 应用程序不能。如果您需要这个,您必须自己实现。在某种程度上,旧的条形码应用程序可能可以作为指南。

but the controller is then supposed to let you choose an image to
decode from the photo library

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文