| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- //
- // JSXQDetailViewController.m
- // jitao
- //
- // Created by 罗云飞 on 2018/8/17.
- // Copyright © 2018年 罗云飞. All rights reserved.
- //
- #import "JSXQDetailViewController.h"
- #import "JSXQdetailCell.h"
- @interface JSXQDetailViewController ()<UITableViewDelegate,UITableViewDataSource>{
- UITableView *newtableView;
- NSMutableArray *dataArray;
- }
- @end
- @implementation JSXQDetailViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self setNavTitle:@"需求详情"];
- [self dataInitialization];
-
- [self loadsView];
- // Do any additional setup after loading the view.
- }
- - (void)dataInitialization{
- dataArray = NewMutableArrayInit;
- [dataArray addObject:@"1"];
- [dataArray addObject:@"1"];
- [dataArray addObject:@"1"];
- [dataArray addObject:@"1"];
- [dataArray addObject:@"1"];
-
- }
- #pragma mark ----加载界面
- - (void)loadsView{
- [self.view addSubview:newtableView = [NewControlPackage tableViewInitWithFrame:CGRectMake(0, NavHeader, SCREEN_WIDTH, SCREEN_HEIGHT-(NavHeader+45)) backgroundColor:NewGroupTableViewBackgroundColor style:1 delegate:self dataSource:self showsHorizontalScrollIndicator:NO showsVerticalScrollIndicator:NO hidden:NO tag:100 userInteractionEnabled:YES]];
- newtableView.separatorStyle = NO;
- UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT-45, SCREEN_WIDTH, 45)];
- view.backgroundColor = [UIColor colorWithString:@"#E3E3E3"];
- [self.view addSubview:view];
-
- UIButton *bianjiBT = [UIButton new];
- bianjiBT.frame = CGRectMake(SCREEN_WIDTH-fitScreenWidth(150), 0, fitScreenWidth(150), 45);
- [bianjiBT setTitle:@"立即办理" forState:UIControlStateNormal];
- bianjiBT.titleLabel.font = NewFont(fitScreenWidth(18));
- [bianjiBT setTitleColor:NewWhiteColor forState:UIControlStateNormal];
- [bianjiBT setBackgroundColor:NewButtonColor];
- [view addSubview:bianjiBT];
-
- UIButton *scBT = [UIButton new];
- [scBT setBackgroundColor:NewRedColor];
- [view addSubview:scBT];
-
- scBT.sd_layout
- .centerYEqualToView(view)
- .widthIs(15)
- .heightIs(15)
- .leftSpaceToView(view, 15);
-
- UIButton *scBTff = [UIButton new];
- [scBTff setTitle:@"收藏" forState:UIControlStateNormal];
- scBTff.titleLabel.font = NewFont(14);
- [scBTff setTitleColor:[UIColor colorWithString:@"#6C6C6C"] forState:UIControlStateNormal];
- [view addSubview:scBTff];
-
- scBTff.sd_layout
- .centerYEqualToView(view)
- .widthIs(30)
- .heightIs(15)
- .leftSpaceToView(scBT, 10);
-
-
- }
- #pragma mark-------------------------UITableView------------------------------------
- -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- {
- return 1;
- }
- //返回每段行数
- -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- return 1;
- }
- -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *Cell = @"Cell";
- JSXQdetailCell * cell = [tableView dequeueReusableCellWithIdentifier:Cell];
- if (cell == nil) {
- cell = [[JSXQdetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell];
- }
- [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果)
- cell.accessoryType = UITableViewCellAccessoryNone;
-
- return cell;
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- return SCREEN_HEIGHT-NavHeader-45;
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
- // NewprojectDetailViewController *vc = [[NewprojectDetailViewController alloc] init];
- // NewPushViewController(vc);
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
- return CGFLOAT_MIN;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
- return CGFLOAT_MIN;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
- return [[UIView alloc] init];
- }
- - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
- return [[UIView alloc] init];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|