GiGaMaskTime/GIGA/Common/LXDanMuManager/LXDanMuManager.h

35 lines
1.2 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// LXDanMuManager.h
// LXAnimationTest
//
// Created by lianxiang on 2018/8/14.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@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