unash / BarrageRenderer

一个 iOS 上的弹幕渲染库.

Home Page:https://github.com/unash/BarrageRenderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

弹幕创建的时候报错

langlang1015 opened this issue · comments

commented

不是用cocoapods的获取的代码,直接把代码放在工程中的。 报错信息如下: exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: [class conformsToProtocol:@protocol(BarrageViewProtocol)]'

commented

确认一下 viewClassName 是否设置了正确的值。
如果正确,看一下 viewClassName 所标识的类是否实现了 BarrageViewProtocol 协议。

commented

我手动配置了: descriptor.params[@"viewClassName"] = NSStringFromClass([UILabel class]);还是不行的。

commented

看一下 UILabel+BarrageView.h 有没有正常加入工程;
如加,看一下 UILabel+BarrageView 分类的 load 方法有没有被调用

commented

谢谢指点,找到问题了,是工程的问题,做的是内嵌sdk,类别不能加载,配置other linker flags 就可以了。