12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // YOUPAIOCBarrageCell.h
- // TestApp
- //
- // Created by QMTV on 2017/8/21.
- // Copyright © 2017年 LFC. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "CALayer+VQ_OCBarrage.h"
- #import "YOUPAIOCBarrageDescriptor.h"
- NS_ASSUME_NONNULL_BEGIN
- @protocol OCBarrageCellDelegate;
- typedef void(^piaoPingBlock)(void);
- @interface YOUPAIOCBarrageCell : UIView
- @property (nonatomic, assign, getter=isIdle) BOOL idle;//是否是空闲状态
- @property (nonatomic, assign) NSTimeInterval idleTime;//开始闲置的时间, 闲置超过5秒的, 自动回收内存
- @property (nonatomic, strong, nullable) YOUPAIOCBarrageDescriptor *barrageDescriptor;
- @property (nonatomic, strong, readonly, nullable) CAAnimation *barrageAnimation;
- @property (nonatomic, assign) int trackIndex;
- @property(nonatomic,copy)piaoPingBlock Clickblock;
- - (void)youpaifaddBarrageAnimationWithDelegate:(id<CAAnimationDelegate>)animationDelegate;
- - (void)prepareForReuse;
- - (void)youpaifclearContents;
- - (void)youpaifupdateSubviewsData;
- - (void)youpaiflayoutContentSubviews;
- - (void)youpaifconvertContentToImage;
- - (void)sizeToFit;//设置好数据之后调用一下自动计算bounds
- - (void)removeSubViewsAndSublayers;//默认删除所有的subview和sublayer; 如果需要选择性的删除可以重写这个方法.
- - (void)youpaifaddBorderAttributes;
- @end
- @protocol OCBarrageCellDelegate <NSObject, CAAnimationDelegate>
- @optional
- @end
- NS_ASSUME_NONNULL_END
|