DeveceList_VC.m 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //
  2. // DeveceList_VC.m
  3. // Haishenghai-master
  4. //
  5. // Created by GG on 2018/12/30.
  6. // Copyright © 2018年 Haishenghai intelligence network technology. All rights reserved.
  7. //
  8. #import "DeveceList_VC.h"
  9. #import <MJRefresh.h>
  10. #import "SiteTableViewController.h"
  11. #import "DeveceTableViewController.h"
  12. #define ScreenWidth [UIScreen mainScreen].bounds.size.width
  13. #define ScreenHeight [UIScreen mainScreen].bounds.size.height
  14. @interface DeveceList_VC ()
  15. @end
  16. @implementation DeveceList_VC
  17. // 如果不想让其他页面的导航栏变为透明 需要重置
  18. - (void)viewWillDisappear:(BOOL)animated{
  19. [super viewWillAppear:animated];
  20. }
  21. - (void)viewDidLoad {
  22. [super viewDidLoad];
  23. // Do any additional setup after loading the view.
  24. self.navigationItem.title = @"设备";
  25. self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:60/255.0 green:114/255.0 blue:255/255.0 alpha:1];
  26. [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
  27. self.view.backgroundColor = [UIColor whiteColor];
  28. CGFloat width = self.view.frame.size.width*0.25;
  29. CGFloat height = self.view.frame.size.height-64;
  30. //右侧
  31. DeveceTableViewController *devece =[[DeveceTableViewController alloc]init];
  32. devece.view.frame = CGRectMake(width+0.5, 0, ScreenWidth-width, height);
  33. [self addChildViewController:devece];
  34. [self.view addSubview:devece.view];
  35. //左侧
  36. SiteTableViewController *site = [[SiteTableViewController alloc]init];
  37. site.view.frame = CGRectMake(0, 64, width, height);
  38. site.delegate = devece;
  39. [self addChildViewController:site];
  40. [self.view addSubview:site.view];
  41. UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(width, 0, 0.5, ScreenHeight)];
  42. lineView.backgroundColor = [UIColor grayColor];
  43. [self.view addSubview:lineView];
  44. }
  45. -(void)createData{
  46. }
  47. - (void)didReceiveMemoryWarning {
  48. [super didReceiveMemoryWarning];
  49. // Dispose of any resources that can be recreated.
  50. }
  51. //#pragma mark---respose Event
  52. //
  53. //-(void)addBtnClick:(UIButton *)addBtn{
  54. //}
  55. //
  56. //-(void)studyBtnClick:(UIButton *)studyBtn{
  57. //
  58. //}
  59. /*
  60. #pragma mark - Navigation
  61. // In a storyboard-based application, you will often want to do a little preparation before navigation
  62. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  63. // Get the new view controller using [segue destinationViewController].
  64. // Pass the selected object to the new view controller.
  65. }
  66. */
  67. @end