5.UITableView基本使用
来源:互联网 发布:完美假期王蒙淘宝店 编辑:程序博客网 时间:2024/06/06 04:14
1.tableView基本使用
- tableView刷新一个section:
NSIndexSet *indexSet=[[NSIndexSet alloc] initWithIndex:1];
[tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
- 刷新指定行
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:0 inSection:0];
[_tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
- 滚动到最后一行
NSIndexPath *path = [NSIndexPath indexPathForRow:self.messages.count -1 inSection:0];
[self.tableView scrollToRowAtIndexPath:path atScrollPosition:UITableViewScrollPositionBottom animated:YES];
右边的索引
- (nullable NSArray<NSString *> *)sectionIndexTitlesForTableView:(UITableView *)tableView{
return @[@"A",@"B",@"C"];
}header view实现复用
1.在返回head view的时候,有个UITableViewHeaderFooterView,用法和创建cell类似:
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
static NSString *ID=@"TableViewHeaderFooterView";
UITableViewHeaderFooterView *herdView=[tableView dequeueReusableHeaderFooterViewWithIdentifier:ID];
if (!herdView) {
herdView=[[UITableViewHeaderFooterView alloc]initWithReuseIdentifier:ID];
return herdView;
- 5.UITableView基本使用
- UITableView 基本使用
- UITableView基本使用
- UITableView的基本使用
- UITableView 的基本使用
- UITableView基本使用(二)
- iOS -- UITableView基本使用
- UITableView 的基本使用
- iOS -- UITableView基本使用
- ios控件 UITableView 基本使用
- UITableView的基本使用一
- iOS UITableView的基本使用
- 浅谈UITableview 基本使用
- Swift-UITableView的基本使用
- iOS:UITableView 使用(一)--基本使用
- (十二)UITableView的基本使用
- UITableView 的基本使用的介绍
- 第二十一篇:UITableView的基本使用
- VIM入门
- AsyncTask
- 1、Two Sum
- windows8.1+ubuntu 14.04双系统安装
- 输入一行字符串,把字符串翻转[单词顺序不变]
- 5.UITableView基本使用
- LeetCode Permutaions
- 菜单 PHP 开发中的外围资源性能分析(一)
- Windows2003终端服务器超出了最大允许连接数
- MySQL下创建索引
- Log4j使用指南
- Android sdk 下载链接
- INSERT IGNORE 与INSERT INTO的区别
- 全极化SAR图像freeman分解