// // FenceSiteVC.m // jiaPei // // Created by apple on 2017/8/16. // Copyright © 2017年 JCZ. All rights reserved. // #import "FenceSiteVC.h" #import "FenceSiteCell.h" #import "AllCoachPlanVC.h" @interface FenceSiteVC () { UITableView *mainTableView; } @end @implementation FenceSiteVC - (void)viewDidLoad { [super viewDidLoad]; self.title = @"选择训练场"; self.view.backgroundColor = backGroundColor; [self configNavigationBar]; mainTableView = [[UITableView alloc] initWithFrame:kFrame style:UITableViewStyleGrouped]; mainTableView.height -= kNavOffSet; mainTableView.delegate = self; mainTableView.dataSource = self; mainTableView.rowHeight = 380; [self.view addSubview:mainTableView]; } -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; self.tabBarController.tabBar.hidden = YES; } -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return _dataArray.count; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 1; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { FenceSiteCell *cell = [tableView dequeueReusableCellWithIdentifier:@"FenceSiteCell"]; if (cell == nil) { cell = [[FenceSiteCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"FenceSiteCell"]; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.superVC = self; } cell.dataDic = _dataArray[indexPath.section]; return cell; } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { AllCoachPlanVC *vc = [[AllCoachPlanVC alloc] init]; NSDictionary *dic = _dataArray[indexPath.section]; vc.fenceSiteID = dic[@"ID"]; vc.dqbh = _dqbh; [self navPushHideTabbarToVC:vc]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } @end