// // YOUPAIOCBarrageCell.h // TestApp // // Created by QMTV on 2017/8/21. // Copyright © 2017年 LFC. All rights reserved. // #import #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)animationDelegate; - (void)prepareForReuse; - (void)youpaifclearContents; - (void)youpaifupdateSubviewsData; - (void)youpaiflayoutContentSubviews; - (void)youpaifconvertContentToImage; - (void)sizeToFit;//设置好数据之后调用一下自动计算bounds - (void)removeSubViewsAndSublayers;//默认删除所有的subview和sublayer; 如果需要选择性的删除可以重写这个方法. - (void)youpaifaddBorderAttributes; @end @protocol OCBarrageCellDelegate @optional @end NS_ASSUME_NONNULL_END