gpt4 book ai didi

objective-c - ZXingWidgetController 加载时显示空白屏幕

转载 作者:行者123 更新时间:2023-11-29 04:52:41 25 4
gpt4 key购买 nike

我在 iOS Simulator 4.3 上使用 Xcode 4.1

我已按照自述文件中的说明将 ZXing 库导入到我的项目中。

当我尝试加载 Controller 时,我看到的只是一个白色屏幕,底部有一个“取消”按钮。我知道模拟器无法拍照,但 Controller 应该让您从照片库中选择要解码的图像。有人遇到过这个问题或者对造成这个问题的原因有任何想法吗?

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

编辑:忘了提及,模拟器上有我已经加载的图片。

最佳答案

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

你在哪里看到这个?它不在自述文件或代码中。

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

关于objective-c - ZXingWidgetController 加载时显示空白屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8554558/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com