// // LXDanMuManager.h // LXAnimationTest // // Created by lianxiang on 2018/8/14. // Copyright © 2018年 com.giga.ios. All rights reserved. // #import #import @interface LXDanMuManager : NSObject @property (nonatomic,strong) NSArray *trackSpeedArray; @property (nonatomic,assign) float centerY;//所有轨道中心点 @property (nonatomic,assign) float trackWidth; @property (nonatomic,strong) NSTimer *timer; @property (nonatomic,strong) UIView *superView; @property (nonatomic,strong) NSMutableArray *trackArray; @property (nonatomic,strong) UIView *baseView; +(LXDanMuManager *)shareInstance; -(void)createDanmuWithTrackSpeedArray:(NSArray *)trackSpeedArray centerY:(float)centerY trackWidth:(float)trackWidth showInView:(UIView *)inView; /** 插入一条弹幕,可以插入任意继承UIView的对象 @param customView 自定义的view(注意,最高不能超过轨道的高,否则会出问题) @param trackIndex 插入弹幕的轨道(为-1则代表自动寻找最不拥挤的轨道插入) */ -(void)appendDanMuWithCustomView:(UIView *)customView toTrackIndex:(NSInteger)trackIndex; -(void)start; -(void)pause; -(void)stop; -(void)destory; @end