// // KDPForecastOrderListVC.m // KuDianProject // // Created by 学丽 on 2019/7/8. // Copyright © 2019 KDP. All rights reserved. // #import "KDPForecastOrderListVC.h" #import "KDPForecastOrderCell.h" @interface KDPForecastOrderListVC () { UILabel *_orderLabel; } @property(nonatomic,strong)UITableView *forecastView; @end @implementation KDPForecastOrderListVC - (void)viewDidLoad { [super viewDidLoad]; [self setNavUI]; } -(void)setNavUI { self.view.backgroundColor=[UIColor whiteColor]; [self.navBar addleftReturnButton:self selector:@selector(returnClickBtn)]; self.navBar.navTitleLabel.text=@"--月预估收益"; [self.view addSubview:self.forecastView]; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { KDPForecastOrderCell *listC=[tableView dequeueReusableCellWithIdentifier:@"foreorder"]; if (!listC) { listC=[[KDPForecastOrderCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"foreorder"]; listC.selectionStyle=UITableViewCellSelectionStyleNone; } return listC; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 5; } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 110; } -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } -(void)returnClickBtn { [self.navigationController popViewControllerAnimated:YES]; } -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.navigationController.navigationBar.hidden=YES; self.tabBarController.tabBar.hidden=YES; } -(void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; self.tabBarController.tabBar.hidden=NO; } -(UITableView *)forecastView { if (!_forecastView) { _forecastView=[[UITableView alloc]initWithFrame:CGRectMake(0, KDNavBarHeight, SCREEN_WIDTH, self.view.height)]; _forecastView.backgroundColor=[UIColor clearColor]; _forecastView.separatorStyle=UITableViewCellSeparatorStyleNone; _forecastView.delegate=self; _forecastView.dataSource=self; [self addtabheader]; } return _forecastView; } -(void)addtabheader { UIView *backV=[[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 46)]; backV.backgroundColor=[UIColor clearColor]; self.forecastView.tableHeaderView=backV; _orderLabel=[[UILabel alloc]initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 41)]; _orderLabel.text=@"----- 订单:-- 收益:---元"; _orderLabel.font=[UIFont systemFontOfSize:14]; _orderLabel.textColor=[UIColor blackColor]; [backV addSubview:_orderLabel]; UIView *lineV=[[UIView alloc]initWithFrame:CGRectMake(10, 41, SCREEN_WIDTH-20, 5)]; lineV.backgroundColor=[UIColor colorWithHexString:LineColor]; [backV addSubview:lineV]; } @end