IOS之UITableView使用
2014-10-26 06:20
218 查看
使用TableView显示数据时,需要设置数据源和代理;<UITableViewDelegate,UITableViewDataSource>
其中,数据源的主要方法有 :
每一组的行数,此方法必须要实现!!!如果不分组,就是当前表格显示所有数据的行数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
分组数量(如果没有分组,可以不用实现此方法)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
#pragma mark 表格内容 这个方法必须要实现!!!以指定表格行的内容及样式
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath
*)indexPath
其中,数据源的主要方法有 :
每一组的行数,此方法必须要实现!!!如果不分组,就是当前表格显示所有数据的行数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
分组数量(如果没有分组,可以不用实现此方法)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
#pragma mark 表格内容 这个方法必须要实现!!!以指定表格行的内容及样式
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath
*)indexPath
相关文章推荐
- iOS UITableView的使用大全
- IOS开发~UISCrollView与UITableView嵌套使用终极解决方案
- IOS 表视图(UITableVIew)的使用方法(4)自定义表视图单元
- iOS开发UI篇—UITableview控件使用小结
- IOS 表视图(UITableVIew)的使用方法(8)表视图的编辑功能(多选)
- ios--UITableview的基本使用方法
- IOS学习:UITableView使用详解3 分组表的简单使用
- IOS 表视图(UITableVIew)的使用方法(5)表视图的编辑功能(删除)
- iOS 表视图(UITableVIew)的使用方法(1)表视图的示例
- [IOS]UITableView重用(使用多个自定义Cell)
- iOS 之 UITableView 使用索引
- IOS 学习:UITableView 使用详解1
- iOS开发>>>UITableView下拉刷新控件的使用
- IOS 表视图(UITableVIew)的使用方法(6)表视图的编辑功能(新增Add)
- iOS UITableView的使用大全
- ios 中使用 Search Display Controller 来对 UITableView 进行前台查询
- IOS UITableView表视图和导航控制器的交互使用
- iOS7中UITableView中cell的使用
- IOS开发~UISCrollView与UITableView嵌套使用终极解决方案
- IOS 表视图(UITableVIew)的使用方法(7)表视图的编辑功能(拖拉调整排序位置)