我希望我的页脚出现在底部,在下图中与网格绑定的图像页脚中,我希望页脚需要固定在底部,如果 tableview 行或多或少。
-(UITableViewCell *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
static NSString *CellIdentifier = @"SectionHeader";
//UITableViewCell *headerView = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f,0.0f,300,60)] ;
UIImage *myImage=[UIImage imageNamed:@"top_bar.png"];
UIImageView *imageView =[[UIImageView alloc] initWithImage:myImage];
imageView.frame= CGRectMake(0, 0, 400, 50);
[headerView addSubview:imageView];
UIButton *circularButton = [UIButton buttonWithType:UIButtonTypeCustom];
CGRect circularRect = CGRectMake(5.0, 5, 58.0, 32.0);
[circularButton setFrame:circularRect];
[circularButton addTarget:self action:@selector(Meetup:) forControlEvents:UIControlEventTouchUpInside];
UIImage *buttonImage = [UIImage imageNamed:@"back_btn.png"];
[circularButton setImage:buttonImage forState:UIControlStateNormal];
[headerView addSubview:circularButton];
return headerView;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 50;
}
我正在使用上面的代码。请告诉我,谢谢