数据分批显示
来源:互联网 发布:下载驱动人生软件 编辑:程序博客网 时间:2024/05/12 22:00
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.array count]+1;
}
//加载数据的方法
-(void)loadMore;
{
//获得plist文件的路径
NSString *path = [[NSBundlemainBundle]pathForResource:@\”add\”
ofType:@\”plist\”];
//将plist文件中的数据存储到可变数组中
NSMutableArray *more = [[NSMutableArrayalloc]initWithContentsOfFile:path];
[selfperformSelectorOnMainThread:@selector(appendTableWithwithObject:morewaitUntilDone:NO];
[morerelease];
}
//添加数据到列表
-(void) appendTableWith:(NSMutableArray *)data;
{
for (int i=0;i<[datacount];i++) {
//将要增加的数据添加到可变数组中
[self.arrayaddObject:[dataobjectAtIndex:i]];
}
//设置要插入行数目
NSMutableArray *insertIndexPaths = [NSMutableArrayarrayWithCapacity:10];
for (int ind = 0; ind < [datacount]; ind++) {
//取得要添加数据所要加入cell的行号
NSIndexPath *newPath = [NSIndexPathindexPathForRow:[self.arrayindexOfObject:[dataobjectAtIndex:ind]]inSection:0];
[insertIndexPathsaddObject:newPath];
}
//将新加入的数据刷到已经存在的数据之后cell中
[self.tableViewinsertRowsAtIndexPaths:insertIndexPathswithRowAnimation:UITableViewRowAnimationFade];
}
- 数据分批显示
- 数据分批显示
- tableview分批显示数据
- cocoa UITableView数据分批显示
- iPhone tableview分批显示数据
- 【學習筆記】tableview分批显示数据
- 转载:iPhone tableview分批显示数据
- 119.ListView数据的分批显示
- 详解iPhone Tableview分批显示数据 实现点击加载更多
- 数据库分页\分批显示
- 经纬度分批显示
- 分批读取Oracle数据
- 数据的分批加载
- 集合数据分批处理
- ListView分批加载数据
- ListView分批加载数据
- php 分批获取数据
- 百万数据分批导出excel
- Java两个小算法
- 拓扑排序
- ubuntu11.04下hadoop-1.0.3安装配置
- 多线程实例子
- java 环境变量设置
- 数据分批显示
- 动态改变Ext store的参数
- 进度条Handler实例
- Handler实例
- ZOJ 2110 Tempter of the Bone 搜索 DFS 解法
- FreeBSD学习笔记(0003):其他相关系统和组织
- [热身题][hdoj_2039]三角形
- 嵌套python解释器(Embedding Python in Another Application)
- 安全测试发现可高速缓存的登录页面的解决方法