TDNavigationBar.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // TDNavigationBar.h
  3. // TheoryNetwork
  4. //
  5. // Created by tederen on 2019/9/26.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. typedef enum{
  11. NavigationTintTypeBlack = 0,
  12. NavigationTintTypeWhite,
  13. }NavigationTintType;
  14. @protocol TDNavigationBarDelegate <NSObject>
  15. - (void)backButtonAction;
  16. - (void)backButtonAction2:(TDButton *)sender;
  17. - (void)rightButtonAction:(TDButton *)sender;
  18. @end
  19. @interface TDNavigationBar : UIView
  20. @property (nonatomic, strong) UIView *lineVi;
  21. @property (nonatomic, strong) TDButton *backButton;
  22. @property (nonatomic, strong) TDButton *backButton2;
  23. @property (nonatomic, strong) UILabel *titleLabel;
  24. @property (nonatomic, strong) TDButton *rightButton;
  25. @property (nonatomic, weak) id<TDNavigationBarDelegate> delegate;
  26. - (instancetype)initNavigationBar;
  27. - (void)setTitle:(NSString *)titleStr;
  28. - (void)setBackButtonTitle:(NSString *)backStr;
  29. - (void)setRightButtonTitle:(NSString *)rightStr;
  30. - (void)setNavigationTintType:(NavigationTintType)type;
  31. @end
  32. NS_ASSUME_NONNULL_END