iOS tableView~尾部添加控件
来源:互联网 发布:高级数据库系统与实现 编辑:程序博客网 时间:2024/06/05 16:17
//联系人:石虎 QQ:1224614774 昵称:嗡嘛呢叭咪哄
/**
注意:在cell的最后一行添加文案
一、效果图:
二、代码实现
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
//底部文案
CGFloat bottomViewH = 30;
UIView *bottomView = [[UIView alloc]initWithFrame:CGRectMake(0,self.view.bounds.size.height -80,OK_SCREEN_WIDTH, bottomViewH)];
if (section ==0) {
bottomView.backgroundColor = [UIColor clearColor];
}else{
bottomView.backgroundColor = OKColorRGBA(188,154,99,0.1);
}
[self.view addSubview:bottomView];
//文案
UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0,8,0,0)];
titleLabel.font = kGlobalFontSize_13;
titleLabel.text = @"八方贵金属合作机构均有国家监管保障";
titleLabel.textAlignment = NSTextAlignmentCenter;
[titleLabel sizeToFit];
titleLabel.ok_centerX = self.view.ok_centerX;
titleLabel.textColor = kGlobalButtonYellow;
[bottomView addSubview:titleLabel];
//图片
UIImageView *LeftImage = [[UIImageView alloc] initWithFrame:CGRectMake(titleLabel.mj_x-20,8, titleLabel.ok_height, titleLabel.ok_height)];
LeftImage.image = [UIImage imageNamed:@"img_shield_shield"];
[bottomView addSubview:LeftImage];
return bottomView ;
}
谢谢!!!
- iOS tableView~尾部添加控件
- iOS开发-webView添加头部与尾部控件
- IOS控件-tableview
- iOS中tableView组头部和尾部标题设置
- iOS开发-UIWebView添加头部与尾部控件 && 仿iOS 今日头条新闻详情页结构实现
- iOS 竖向tableView上添加横向tableView
- ios tableView添加响应事件
- iOS tableView 控件用法 [转]
- IOS控件TableView下拉刷新
- ios tableView那些事(二)给tableView添加数据
- ios tableView那些事 (七) 给tableView添加响应事件
- ios tableView那些事 (十三) 给 tableview 添加索引
- ios tableView那些事 (十三) 给 tableview 添加索引
- ios tableView那些事 (七) 给tableView添加响应事件
- ios tableView那些事 (七) 给tableView添加响应事件
- ios tableView那些事(二)给tableView添加数据
- ios tableView那些事 (七) 给tableView添加响应事件
- iOS NSMutableArray中NSArray添加到tableview
- hibernate中get和load区别?
- nginx再学习
- leetcode 662
- uva115
- [背包 贪心] Codeforces #365D. Free Market
- iOS tableView~尾部添加控件
- [51nod 1450] 闯关游戏
- Python-zipfile解压中文问题
- RadioButton点击事件不起作用的坑
- Redis部署主从关系
- 剑指offer面试题12:矩阵中的路径Java实现版
- 《劝学》——荀子
- The Wide and Deep Learning Model(译文+Tensorlfow源码解析)
- G