酷店

KDPForecastOrderListVC.m 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. //
  2. // KDPForecastOrderListVC.m
  3. // KuDianProject
  4. //
  5. // Created by 学丽 on 2019/7/8.
  6. // Copyright © 2019 KDP. All rights reserved.
  7. //
  8. #import "KDPForecastOrderListVC.h"
  9. #import "KDPForecastOrderCell.h"
  10. @interface KDPForecastOrderListVC ()<UITableViewDelegate,UITableViewDataSource>
  11. {
  12. UILabel *_orderLabel;
  13. }
  14. @property(nonatomic,strong)UITableView *forecastView;
  15. @end
  16. @implementation KDPForecastOrderListVC
  17. - (void)viewDidLoad {
  18. [super viewDidLoad];
  19. [self setNavUI];
  20. }
  21. -(void)setNavUI
  22. {
  23. self.view.backgroundColor=[UIColor whiteColor];
  24. [self.navBar addleftReturnButton:self selector:@selector(returnClickBtn)];
  25. self.navBar.navTitleLabel.text=@"--月预估收益";
  26. [self.view addSubview:self.forecastView];
  27. }
  28. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  29. {
  30. KDPForecastOrderCell *listC=[tableView dequeueReusableCellWithIdentifier:@"foreorder"];
  31. if (!listC) {
  32. listC=[[KDPForecastOrderCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"foreorder"];
  33. listC.selectionStyle=UITableViewCellSelectionStyleNone;
  34. }
  35. return listC;
  36. }
  37. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  38. {
  39. return 5;
  40. }
  41. -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  42. {
  43. }
  44. -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  45. {
  46. return 110;
  47. }
  48. -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  49. {
  50. return 1;
  51. }
  52. -(void)returnClickBtn
  53. {
  54. [self.navigationController popViewControllerAnimated:YES];
  55. }
  56. -(void)viewWillAppear:(BOOL)animated
  57. {
  58. [super viewWillAppear:animated];
  59. self.navigationController.navigationBar.hidden=YES;
  60. self.tabBarController.tabBar.hidden=YES;
  61. }
  62. -(void)viewWillDisappear:(BOOL)animated
  63. {
  64. [super viewWillDisappear:animated];
  65. self.tabBarController.tabBar.hidden=NO;
  66. }
  67. -(UITableView *)forecastView
  68. {
  69. if (!_forecastView) {
  70. _forecastView=[[UITableView alloc]initWithFrame:CGRectMake(0, KDNavBarHeight, SCREEN_WIDTH, self.view.height)];
  71. _forecastView.backgroundColor=[UIColor clearColor];
  72. _forecastView.separatorStyle=UITableViewCellSeparatorStyleNone;
  73. _forecastView.delegate=self;
  74. _forecastView.dataSource=self;
  75. [self addtabheader];
  76. }
  77. return _forecastView;
  78. }
  79. -(void)addtabheader
  80. {
  81. UIView *backV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 46)];
  82. backV.backgroundColor=[UIColor clearColor];
  83. self.forecastView.tableHeaderView=backV;
  84. _orderLabel=[[UILabel alloc]initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 41)];
  85. _orderLabel.text=@"----- 订单:-- 收益:---元";
  86. _orderLabel.font=[UIFont systemFontOfSize:14];
  87. _orderLabel.textColor=[UIColor blackColor];
  88. [backV addSubview:_orderLabel];
  89. UIView *lineV=[[UIView alloc]initWithFrame:CGRectMake(10, 41, SCREEN_WIDTH-20, 5)];
  90. lineV.backgroundColor=[UIColor colorWithHexString:LineColor];
  91. [backV addSubview:lineV];
  92. }
  93. @end