YOUPAIOCBarrageDescriptor.h 1.9 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // YOUPAIOCBarrageDescriptor.h
  3. // TestApp
  4. //
  5. // Created by QMTV on 2017/8/23.
  6. // Copyright © 2017年 LFC. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "OCBarrageHeader.h"
  11. typedef void(^tapBlock)(void);
  12. @class YOUPAIOCBarrageCell;
  13. NS_ASSUME_NONNULL_BEGIN
  14. @interface YOUPAIOCBarrageDescriptor : NSObject
  15. @property (nonatomic,strong)tapBlock clickBlock;
  16. @property (nonatomic, assign, nullable) Class barrageCellClass;
  17. @property (nonatomic, assign) OCBarragePositionPriority positionPriority;//显示位置normal型的渲染在low型的上面, height型的渲染在normal上面
  18. @property (nonatomic, assign) CGFloat animationDuration;//动画时间, 时间越长速度越慢, 时间越短速度越快
  19. @property (nonatomic, assign) CGFloat fixedSpeed;//固定速度, 可以防止弹幕在有空闲轨道的情况下重叠, 取值0.0~100.0, animationDuration与fixedSpeed只能选择一个, fixedSpeed设置之后可以不用设置animationDuration
  20. @property (nonatomic, copy, nullable) OCBarrageTouchAction touchAction DEPRECATED_MSG_ATTRIBUTE("use OCBarrageCellTouchedAction instead");
  21. @property (nonatomic, copy, nullable) OCBarrageCellTouchedAction cellTouchedAction;//新属性里回传了被点击的cell, 可以在代码块里更改被点击的cell的属性, 比如之前有用户需要在弹幕被点击的时候修改被点击的弹幕的文字颜色等等. 用来替代旧版本的touchAction
  22. @property (nonatomic, strong, nullable) UIColor *borderColor; // Default is no border
  23. @property (nonatomic, assign) CGFloat borderWidth; // Default is 0
  24. @property (nonatomic, assign) CGFloat cornerRadius; // Default is 8
  25. @property (nonatomic, assign) NSRange renderRange;//渲染范围, 最终渲染出来的弹幕的Y坐标最小不小于renderRange.location, 最大不超过renderRange.length-barrageCell.height
  26. @end
  27. NS_ASSUME_NONNULL_END