问题:Unknown class ZBarReaderView in Interface Builder file.

在使用ZBarSDK二维码扫描时,报以下错误:

2013-10-18 14:56:13.095 WebImageTest[284:60b] Unknown class ZBarReaderView in Interface Builder file.
2013-10-18 14:56:13.108 WebImageTest[284:60b] -[UIView setReaderDelegate:]: unrecognized selector sent to instance 0x17d704d0
2013-10-18 14:56:13.112 WebImageTest[284:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setReaderDelegate:]: unrecognized selector sent to instance 0x17d704d0'
*** First throw call stack:
(0x305d4f53 0x3a8fc6af 0x305d88e7 0x305d71d3 0x30526598 0x4b475 0x4b36f 0x32d4a603 0x32d4a3c1 0x32ed6d43 0x32df4a83 0x32df488d 0x32df4825 0x32d46023 0x329cf24b 0x329caa5b 0x329ca8ed 0x329ca2ff 0x329ca10f 0x329c3e3d 0x305a01d5 0x3059db79 0x3059debb 0x30508ce7 0x30508acb 0x351e1283 0x32daaa41 0x4b987 0x3ae04ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

解决方案如下:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    ......
    // force view class to load so it may be referenced directly from NIB [ZBarReaderView class];
    [ZBarReaderView class];
    ......
}



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值