UITableView NSIndexPath属性讲解
2013-06-06 09:04
162 查看
NSIndexPath 是一个对象,它用来表示一个树形的记录地址。
提到UITableView,就必须的说一说NSIndexPath。UITableView声明了一个NSIndexPath的类别,主要用 来标识当前cell的在tableView中的位置,该类别有section和row两个属性,前者标识当前cell处于第几个section中,后者代 表在该section中的第几行。 UITableView只能有一列数据(cell),且只支持纵向滑动,当创建好的tablView第一次显示的时候,我们需要调用其reloadData方法,强制刷新一次,从而使tableView的数据更新到最新状态。
提到UITableView,就必须的说一说NSIndexPath。UITableView声明了一个NSIndexPath的类别,主要用 来标识当前cell的在tableView中的位置,该类别有section和row两个属性,前者标识当前cell处于第几个section中,后者代 表在该section中的第几行。 UITableView只能有一列数据(cell),且只支持纵向滑动,当创建好的tablView第一次显示的时候,我们需要调用其reloadData方法,强制刷新一次,从而使tableView的数据更新到最新状态。
NSIndexPath的创建
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; -(void)cellImageDidLoad:(NSIndexPath *)indexPath image:(UIImage *)image { UITableViewCell *cell = [wqTablecellForRowAtIndexPath:indexPath]; cell.imageView.image = image; }
相关文章推荐
- IOS UITableView NSIndexPath属性讲解
- IOS UITableView NSIndexPath属性讲解
- iOS UITableView NSIndexPath属性讲解
- IOS UITableView NSIndexPath属性讲解
- IOS UITableView NSIndexPath属性讲解***
- UITableView NSIndexPath属性讲解
- OS UITableView属性讲解
- UITableView传值(自己使用)(属性,代理传值)
- UIScrollView && UITableView相关属性汇总及常用方法
- IOS UItableView一些属性及方法
- 【iphone应用开发】iphone应用开发之六:UITableView的详细讲解(一)
- UIButton,UIScrollView,UITableView常见属性,使用案例 - iOS
- UITableView常见属性和方法
- UIScrollView && UITableView相关属性汇总(待续)
- UITableView进行讲解
- IOS学习笔记(十二)之IOS开发之表视图(UITableView)的相关类,属性与表视图实现学习(二)
- ios开发总结之UITableView常用属性和方法
- UI基础--UITableView,UITableViewDataSource,UITableViewDelegate的一些属性和方法
- UITableView 详细讲解
- UITableView 详细讲解