TableView,加载更多
来源:互联网 发布:2017网络效应题库 编辑:程序博客网 时间:2024/05/19 03:23
把tableveiw 的footerview 在footer上添加加载更多 的button
UIButton *btn=[UIButtonbuttonWithType:UIButtonTypeCustom];
[btnsetFrame:CGRectMake(0, 0, 320, 40)];
[btn setTitle:@"更多精彩" forState:UIControlStateNormal];
[btn setTitleColor:[UIColorredColor]forState:UIControlStateNormal];
[btn addTarget:selfaction:@selector(Loadmore)forControlEvents:UIControlEventTouchUpInside];
self.Table.tableFooterView=btn;
-(void)Loadmore
{
NSMutableArray *mutableArray=[[NSMutableArrayalloc]initWithCapacity:1];
for(int i=[self.dataSourcecount];i<[self.dataSourcecount]+7;i++)
{
NSIndexPath *indexPath=[NSIndexPathindexPathForRow:iinSection:0];
[mutableArrayaddObject:indexPath];
}
//记住这里要增加的数据是需要和前面声明的tabeview 初次加载的数据是一样的哦
for (int i=0; i<7; i++)
{
NSString *str=[NSStringstringWithFormat:@"第%d行",i];
[self.dataSourceaddObject:str];
}
[self.tableViewinsertRowsAtIndexPaths:mutableArraywithRowAnimation:UITableViewRowAnimationFade];
}
- TableView,加载更多
- tableView - 点击加载更多(通知)
- tableView下拉刷新与加载更多
- ios 上拉加载更多tableview MJRefresh
- 详解iPhone Tableview分批显示数据 实现点击加载更多
- tableView reload 加载更多数据,tableView 下面会出现向上弹动的不自然效果
- 加载更多
- 加载更多
- 加载更多
- 加载更多
- UITableView /cell上的button,动态配置tableView的cell的高度(效果为点击加载更多,cell加载所有内容,反之,只加载3行)
- Tableview 更多数据的显示方法
- tableView点击下拉更多的效果
- tableView点击更多及搜索栏
- Android_listview分页加载更多
- UITableView加载更多显示
- 滚动加载更多内容
- 下拉加载更多
- POJ 2777 Count Color
- 练习普通话的绕口令
- Multi-Projector Based Display Code ---- Calibration
- java中String的比较
- 使用__FILE__和__LINE__定位错误
- TableView,加载更多
- NYoj 325&&456 zb的生日&&邮票分你一半[0-1背包变形]
- UVA 10344 (13.07.19)
- Multi-Projector Based Display Code ---- ImageViewer
- HDU 4350 Card(数学)
- 封装一个自动检索框,原型是autocomplete
- Multi-Projector Based Display Code ---- ModelViewer
- 关于Java中StringBuffer的capacity问题
- 红帽Linux.5.5企业版本在VM虚拟机里中文乱码的解决方法