BaseNavView.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // BaseNavView.h
  3. // 乐销
  4. //
  5. // Created by 隋林栋 on 2016/12/17.
  6. // Copyright © 2016年 ping. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #define BASENAVVIEW_LEFT_TITLE_FONT_NUM 16
  10. @interface BaseNavView : UIView
  11. @property (nonatomic, strong) UILabel * labelTitle;
  12. @property (nonatomic, strong) UIControl * backBtn;
  13. @property (nonatomic, strong) UIView *rightView;
  14. @property (nonatomic, strong) UIView *leftView;
  15. @property (nonatomic, strong) void (^leftBlock)(void);
  16. @property (nonatomic, strong) void (^rightBlock)(void);
  17. @property (nonatomic, strong) void (^blockBack)(void);
  18. @property (nonatomic, assign) BOOL isNotShowEditAlert;
  19. //刷新页面
  20. + (instancetype)initNavTitle:(NSString *)title
  21. leftView:(UIView *)leftView
  22. rightView:(UIView *)rigthView;
  23. - (void)resetNavTitle:(NSString *)title
  24. leftView:(UIView *)leftView
  25. rightView:(UIView *)rightView;
  26. //左返回 右view
  27. + (instancetype)initNavBackTitle:(NSString *)title
  28. rightView:(UIView *)rigthView;
  29. //左图片 右图片
  30. + (instancetype)initNavTitle:(NSString *)title
  31. leftImageName:(NSString *)leftImageName
  32. leftBlock:(void (^)(void))leftBlock
  33. rightImageName:(NSString *)rightImageName
  34. righBlock:(void (^)(void))rightBlock;
  35. //返回 右图片
  36. + (instancetype)initNavBackWithTitle:(NSString *)title
  37. rightImageName:(NSString *)rightImageName
  38. righBlock:(void (^)(void))rightBlock;
  39. //返回 右文字
  40. + (instancetype)initNavBackTitle:(NSString *)title
  41. rightTitle:(NSString *)rightTitle
  42. rightBlock:(void (^)(void))rightBlock;
  43. //更改title
  44. - (void)changeTitle:(NSString *)title;
  45. //更改nav right title
  46. - (void)changeRightTitle:(NSString *)title;
  47. //更改nav right image
  48. - (void)changeRightImage:(NSString *)imageName;
  49. //设置图片
  50. + (void)resetControl:(UIView*) control
  51. imageName:(NSString *) imageName
  52. isLeft:(BOOL)isLeft;
  53. + (void)resetControl:(UIView*) control
  54. title:(NSString *) title
  55. isLeft:(BOOL)isLeft;
  56. //返回 右文字
  57. - (void)initNavBackTitle:(NSString *)title
  58. rightTitle:(NSString *)rightTitle
  59. rightBlock:(void (^)(void))rightBlock;
  60. //设置蓝色模式
  61. - (void)restBlueStyle;
  62. #pragma mark 点击事件
  63. - (void)btnBackClick;
  64. @end