为什么在 iPhone 模拟器中找不到图像?
我想测试条形码演示,但我没有 Iphone。所以我必须在模拟器中测试条形码的图像。
我将条形码图像拖到模拟器上。并按住图片一会,保存。
但我测试了下面的代码。上面我找不到任何图片。
ZBarReaderController *reader = [ZBarReaderController new];
reader.readerDelegate = self;
if([ZBarReaderController isSourceTypeAvailable:
UIImagePickerControllerSourceTypeSavedPhotosAlbum])
reader.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[reader.scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
[self presentModalViewController: reader
animated: YES];
我已经处理了这个问题一天,但我一直无法找到原因......
希望我能在周末解决它。
I want to test a BarCode demo, But I haven't got an Iphone. so I must test the image of BarCode in the simulator.
I drag the image of BarCode on the simulator. And pressed the picture for a while and save it.
but I test the below code. I can't find any picture above.
ZBarReaderController *reader = [ZBarReaderController new];
reader.readerDelegate = self;
if([ZBarReaderController isSourceTypeAvailable:
UIImagePickerControllerSourceTypeSavedPhotosAlbum])
reader.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[reader.scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
[self presentModalViewController: reader
animated: YES];
I have dealt with the problem for a day, but I haven't been able to find why...
Hope I can solve it in the weekend.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是模拟器的一个已知问题。我曾经通过保存图像两次来使其工作。
This is a know issue with the simulator. I once made it work by saving images twice.
我有过很多次这样的经历。我相信诀窍是在保存图像之前打开图像应用程序。然后关闭它,切换到 Safari 并保存图像。
I had this numerous times. I believe the trick is to open the images app prior to saving the image. Then close it, switch to Safari and save the image.