123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- //
- // KDPForecastVC.m
- // KuDianProject
- //
- // Created by 学丽 on 2019/7/8.
- // Copyright © 2019 KDP. All rights reserved.
- //
- #import "KDPForecastVC.h"
- #import "KDPForecastListCell.h"
- @interface KDPForecastVC ()<UITableViewDelegate,UITableViewDataSource>
- {
- UILabel *_orderNumMoneyLabel;
- }
- @property(nonatomic,strong)UITableView *forecastView;
- @end
- @implementation KDPForecastVC
- - (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
- {
- KDPForecastListCell *listC=[tableView dequeueReusableCellWithIdentifier:@"fore"];
- if (!listC) {
- listC=[[KDPForecastListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"fore"];
- listC.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- listC.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
- return listC;
- }
- -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- return 5;
- }
- -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- {
- KDPForecastOrderListVC *orderV=[[KDPForecastOrderListVC alloc]init];
- [self.navigationController pushViewController:orderV animated:YES];
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- return 50;
- }
- -(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, 47)];
- backV.backgroundColor=[UIColor clearColor];
- self.forecastView.tableHeaderView=backV;
-
- _orderNumMoneyLabel=[[UILabel alloc]initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 46)];
- _orderNumMoneyLabel.text=@"预估订单:-- 收益:---元";
- _orderNumMoneyLabel.font=[UIFont systemFontOfSize:14];
- _orderNumMoneyLabel.textColor=[UIColor blackColor];
- [backV addSubview:_orderNumMoneyLabel];
-
- UIView *lineV=[[UIView alloc]initWithFrame:CGRectMake(10, 46, SCREEN_WIDTH-20, 1)];
- lineV.backgroundColor=[UIColor colorWithHexString:LineColor];
- [backV addSubview:lineV];
- }
- @end
|