UITableView的常用属性和代理方法
UISwitch *footerView = [UISwitch new];
UISwitch *headerView = [UISwitch new];
self.tableView.tableHeaderView = headerView;
self.tableView.tableFooterView = footerView;
// 这是tableView的代理方法
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
// 可以返回指定section的尾部视图
} - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
// 可以返回指定section的头部视图
}
self.tableView.sectionFooterHeight = ;
self.tableView.sectionHeaderHeight = ;
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{ } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{ }
// 这个属性可以设置所有的行高,通过这个属性设置的行高都一样
self.tableView.rowHeight = ;
// 优先级比tableView的rowHeight属性要高
// 这是tableView的代理方法
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ }
[self.tableView registerNib:[UINib nibWithNibName:@"WSCell" bundle:nil] forCellReuseIdentifier:cellID]; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:cellID];
UITableView的常用属性和代理方法的更多相关文章
- UITableView的常用属性和cell的内存优化
UITableView的常用属性: 分割线颜色设置: 1> 设置separatorStyle: 分割线的颜色 方法:tableView.separatorStyle = UITableViewC ...
- ios开发UI篇—UIScrollView属性及其代理方法
一.UIScrollView是什么? 1.UIScrollView是滚动的view,UIView本身不能滚动,子类UIScrollview拓展了滚动方面的功能. 2.UIScrollView是所有滚动 ...
- UITableView的一些常用设置和代理方法
- (void)viewDidLoad { [super viewDidLoad]; tableview = [[UITableView alloc]initWithFrame:CGRectMake( ...
- 12-27 UITableView常用属性及方法
UITableView也有自己的代理协议,它本身继承自UIScrollView 一:代理要遵守代理协议<UITableViewDelegate>,代理协议中的代理方法: 1.改变某一行的行 ...
- UITableView常用属性和方法 - 永不退缩的小白菜
UITableView常用属性和方法 - 永不退缩的小白菜 时间 2014-05-27 01:21:00 博客园精华区原文 http://www.cnblogs.com/zhaofucheng11 ...
- UITableView的全部属性、方法以及代理方法执行顺序,看过之后肯定有收获---董鑫
UITableView-------表视图--继承UIScrollView并遵守NSCoding协议 属性 frame-------------设置控件的位置和大小 backgroundColor-- ...
- UITableView表格视图、UITableView代理方法及应用
一.基本知识点 UITableView表格视图,是一个可以滚动的界面(理解为垂直滚动的UIScrollView),可展示多行数据,没有行数的限制,只能有一列. 使用UITableView: 1.展示信 ...
- CoreAnimation 核心动画一 (一些常用属性 和 方法)
1.常用属性: frame bounds center alpha Transition 过渡 transform 动画效果 2.常用方法: +(void)setAnimati ...
- UICollectionView的简单使用和常用代理方法
UICollectionView相对于UITableView有更加自由的布局,做出的界面可变性更大最近开始接触使用UICollectionView,整理了一下常用的代理方法 首先需要先添加UIColl ...
随机推荐
- poj[3093]Margaritas On River Walk
Description One of the more popular activities in San Antonio is to enjoy margaritas in the park alo ...
- css3动画中的steps值详解
css3的动画的animation-timing-function属性定义了动画的速度曲线,一般的速度曲线大家都知道,什么ease,linear,ease-in,ease-out,还有自定义贝塞尔曲线 ...
- Android中如何设置RadioButton在文字的右边,图标在左边
from:http://blog.csdn.net/sunnyfans/article/details/7901592?utm_source=tuicool&utm_medium=referr ...
- Markdown:认识&入门
来源:http://sspai.com/25137 一.认识 Markdown 在刚才的导语里提到,Markdown 是一种用来写作的轻量级「标记语言」,它用简洁的语法代替排版,而不像一般我们用的字处 ...
- 批量去除Teleport Pro整站下载文件冗余代码
teleport pro tppabs标签批量删除 teleport pro tppabs标签批量删除 使 用Teleport Pro下载的网页代码中包含了很多垃圾代码,比如下载的html网页代码中会 ...
- 将数据库备份到AZURE blob storage
1创建一个Storage Account 1)点击Browse->Storage accounts 2) 填写Storage account,请记住这个名字,之后创建credential需要用到 ...
- QT UDP聊天小程序
利用QT的UDP技术,实现两个QT程序之间的聊天程序. #ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include < ...
- uploadify firefox 401
uploadify在firefox下上传会报401错误:这是因为java的框架把其拦截了 拦截的原因是,firefox下的flash在请求和发送请求的时候不会携带cookie和session过去,造成 ...
- 详细学习ORACLE JOBS
一点一点学习jobs的各个方面比较长,比较烦,但是应该看完后会对jobs比较好的应用 一.学习准备 开始dbms_job学习前,先认识一个参数job_queue_processes a.job_que ...
- mac 下卸载mysql的方法
今天在mac上瞎折腾时,把mysql玩坏了,想卸载重装,却发现找不到卸载程序,百度了下,将操作步骤备份于此: cd ~/ sudo rm /usr/local/mysqlsudo rm -rf /us ...