AgreeApprovalViewController.m 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // AgreeApprovalViewController.m
  3. // smartRhino
  4. //
  5. // Created by tederen on 2019/11/8.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "AgreeApprovalViewController.h"
  9. #import "TDNavigationBar.h"
  10. #import "DrawerView.h"
  11. @interface AgreeApprovalViewController ()<TDNavigationBarDelegate>
  12. @property (nonatomic, strong) UIView *myBackImageView;
  13. @end
  14. @implementation AgreeApprovalViewController
  15. - (void)viewDidLoad {
  16. [super viewDidLoad];
  17. [self.view addSubview:self.myBackImageView];
  18. [self.view addSubview:self.myNavigationBar];
  19. self.fd_prefersNavigationBarHidden = YES;
  20. self.myNavigationBar.titleLabel.text = self.title;
  21. self.myNavigationBar.titleLabel.font = [UIFont systemFontOfSize:19.0];
  22. }
  23. #pragma mark - 导航栏事件处理
  24. -(void)back{
  25. if (self.navigationController.viewControllers.count > 1) {
  26. [self.navigationController popViewControllerAnimated:YES];
  27. }else{
  28. [self dismissViewControllerAnimated:YES completion:nil];
  29. }
  30. }
  31. - (void)secondBarButtonItems{
  32. DrawerView *vi = [[DrawerView alloc] initWithFrame:self.view.bounds];
  33. [self.view addSubview:vi];
  34. }
  35. - (void)backButtonAction {
  36. [self back];
  37. }
  38. - (void)backButtonAction2:(id)sender {
  39. [self secondBarButtonItems];
  40. }
  41. - (void)rightButtonAction:(nonnull TDButton *)sender {
  42. }
  43. #pragma mark - setter
  44. - (TDNavigationBar *)myNavigationBar{
  45. if (!_myNavigationBar) {
  46. _myNavigationBar = [[TDNavigationBar alloc]initNavigationBar];
  47. _myNavigationBar.delegate = self;
  48. _myNavigationBar.backButton2.hidden = NO;
  49. _myNavigationBar.titleLabel.textColor = UIColorHex(#FFFFFF);
  50. _myNavigationBar.titleLabel.font = [UIFont systemFontOfSize:19.f];
  51. [_myNavigationBar.backButton2 setImage:IMG(@"快捷跳转") forState:UIControlStateNormal];
  52. [_myNavigationBar.backButton setImage:IMG(@"工作_返回") forState:UIControlStateNormal];
  53. }
  54. return _myNavigationBar;
  55. }
  56. - (UIView *)myBackImageView{
  57. if (!_myBackImageView) {
  58. _myBackImageView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kGXScreenHeigh, kNavigationHeight)];
  59. _myBackImageView.backgroundColor = [UIColor colorWithRed:92/255.0 green:118.0/255.0 blue:167.0/255.f alpha:1.0];
  60. }
  61. return _myBackImageView;
  62. }
  63. @end