unash / BarrageRenderer

一个 iOS 上的弹幕渲染库.
https://github.com/unash/BarrageRenderer
MIT License
2.2k stars 453 forks source link

Expose params in BarrageDescriptor class #86

Closed wongzigii closed 3 years ago

wongzigii commented 6 years ago

/// 属性字典 @property(nonatomic,strong,readonly)NSMutableDictionary * params;

While I initializing a descriptor, I would like to modify the param before the render to receive. So is this possible to expose the params, eg: textColor or font family to interface file? At this time, I need to check out the demo to see which are the optional params before I getting start.

unash commented 6 years ago

这一点主要是考虑自定义 Sprite,其配置参数也可能自定义。此配置参数由 Descriptor 传过来,而 Descriptor 为统一接口对象,不方便为期添加便捷属性,故使用了字典来传递。

实在需要,只能由业务层自己创建一个转换器了。