JHDanmakuRender
一个iOS和OSX通用的弹幕渲染引擎
项目地址 https://github.com/sunsx9316/JHDanmakuRender
在 Podfile 中添加 pod 'JHDanmakuRender'
执行 pod install 或 pod update
导入 #import <JHDanmakuEngine.h>
手动安装下载 JHDanmakuRender 文件夹下的所有文件
将源文件添加到你的工程
导入 #import "JHDanmakuRender.h"
介绍因为对功能的需要 最终还是自己动手写了这个弹幕引擎 部分源码参考了BarrageRenderer 和Bilibili Mac Client
demo基本涵盖了常用的功能 需要的看demo就行
支持iOS、OSX系统
支持全局的字体样式、单个字体样式的更改
支持实时回退功能
支持弹幕行间距调整
更简单的api
简单使用初始化一个滚动弹幕:
JHScrollDanmaku *sc = [[JHScrollDanmaku alloc] initWithFontSize:20 textColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:1] text:@'text' shadowStyle:JHDanmakuShadowStyleGlow font:nil speed:arc4random_uniform(100) + 50 direction:JHScrollDanmakuDirectionR2L]发射弹幕
[[[JHDanmakuEngine alloc] init] sendDanmaku: sc]许可证软件遵循MIT协议 详情请见LICENSE文件
,论文,开题报告