CSJSplashBottomBaseComponentView.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // CSJSplashBottomBaseComponentView.h
  3. // CSJAdSDK
  4. //
  5. // Created by bytedance on 2021/9/15.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import "CSJMaterialMeta+Private.h"
  9. #import "CSJSplashBottomViewInterface.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. #define BUSplashBottomMask_arrowW 14
  12. #define BUSplashBottomMask_heightMargin 30
  13. #define BUSplashBottomMask_bottomMargin 0
  14. /// 开屏底部合规样式基类
  15. @interface CSJSplashBottomBaseComponentView : UIView
  16. @property (nonatomic, strong) id<CSJSplashBottomViewInterface> configuration;
  17. /// 默认合规标题
  18. @property (nonatomic, strong) UILabel *tipLabel;
  19. /// 当有两行文字时用到, 顶部文字
  20. @property (nonatomic, strong) UILabel *tipTitleLabel;
  21. /// 轻扫动画layer
  22. @property (nonatomic, strong) CAGradientLayer *swipeLayer;
  23. @property (nonatomic, copy) void(^actionBlock)(void);
  24. /// 底部合规动画样式
  25. /// @param configuration 广告动画配置
  26. - (instancetype)initWithComponentConfiguration:(id<CSJSplashBottomViewInterface>)configuration;
  27. /// 开始动画 注意:需要子类重写
  28. - (void)startSplashBottomAnimation;
  29. /// 停止移除动画 注意:需要子类重写
  30. - (void)stopSplashBottomAnimation;
  31. /// 当前视图的frame 注意:需要子类重写
  32. /// @param containerFrame 父视图的frame
  33. - (CGRect)splashBottomFrameWithContainerFrame:(CGRect)containerFrame;
  34. /// 当前视图距离底部高度 注意:不不不需要子类重写
  35. /// @param containerFrame 父视图的frame
  36. - (CGFloat)splashBottomBlankHeightWithContainerFrame:(CGRect)containerFrame;
  37. @end
  38. NS_ASSUME_NONNULL_END