CSJCustomNavigationBarView.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // CSJCustomNavigationBarView.h
  3. // CSJAdSDK
  4. //
  5. // Created by bytedance on 2021/1/10.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. typedef NS_ENUM(NSUInteger, BUCustomNavigationBarStyle) {
  10. BUCustomNavigationBarStyleVideoLandingPage,
  11. BUCustomNavigationBarStyleNormalLandingPage,
  12. BUCustomNavigationBarStyleNormalLandingPageNew,
  13. };
  14. @class CSJMaterialMeta;
  15. @class CSJCustomNavigationBarView;
  16. @protocol CSJCustomNavigationBarDelegate <NSObject>
  17. @optional
  18. /// 点击了返回按钮回调
  19. - (void)customNavigationBarDidClickBackButton:(CSJCustomNavigationBarView *)navigationBarView;
  20. /// 点击关闭按钮回调
  21. - (void)customNavigationBarDidClickCloseButton:(CSJCustomNavigationBarView *)navigationBarView;
  22. /// 点击反馈按钮回调
  23. - (void)customNavigationBarDidClickDislikeButton:(CSJCustomNavigationBarView *)navigationBarView;
  24. @end
  25. @interface CSJCustomNavigationBarView : UIView
  26. /// 返回按钮
  27. @property (nonatomic, strong) UIButton *backButton;
  28. /// 关闭按钮,鲁班广告需要隐藏
  29. @property (nonatomic, strong) UIButton *closeButton;
  30. /// 反馈按钮
  31. @property (nonatomic, strong) UIButton *dislikeButton;
  32. /// 标题
  33. @property (nonatomic, strong) UILabel *titleLabel;
  34. /// 底部分割线
  35. @property (nonatomic, strong) UIView *line;
  36. @property (nonatomic, weak) id<CSJCustomNavigationBarDelegate> delegate;
  37. /// 创建自定义导航栏view
  38. /// @param material 广告物料,使用标题和dislikewords
  39. /// @param navBarStyle 导航栏样式,普通落地页和视频落地页的导航栏有差异
  40. - (instancetype)initWithMaterial:(CSJMaterialMeta *)material style:(BUCustomNavigationBarStyle)navBarStyle;
  41. - (void)updateTitleLabel:(NSAttributedString*)attStr;
  42. @end
  43. NS_ASSUME_NONNULL_END