-(void)configUI
{
_tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, DEVICE_SCREEN_WIDTH, DEVICE_SCREEN_HEIGHT - DEVICE_STATUS_BAR_HEIGHT - DEVICE_NAVIGATION_BAR_HEIGHT) style:UITableViewStyleGrouped];
_tableView.backgroundColor = [UIColor whiteColor];
[_tableView registerNib:[UINib nibWithNibName:@"MyAttentionMainCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"MyAttentionMainCell"];
_tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, DEVICE_SCREEN_WIDTH, 0.001)];
_tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, DEVICE_SCREEN_WIDTH, 0.001)];
// _tableView.contentInset = UIEdgeInsetsMake(0, 0, 50, 0);
_tableView.sectionHeaderHeight = 0.001;
_tableView.sectionFooterHeight = 0.001;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.delegate = self;
_tableView.dataSource = self;
[self.view addSubview:_tableView];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
MyAttentionMainCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyAttentionMainCell" forIndexPath:indexPath];
if (!cell) {
cell = [[[NSBundle mainBundle]loadNibNamed:@"MyAttentionMainCell" owner:self options:nil] firstObject];
}
[cell.comehereButton addTarget:self action:@selector(comeHereClick:) forControlEvents:UIControlEventTouchUpInside];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 2;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 200;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 10;
}