UITableView NSIndexPath属性讲解
2017-05-19 09:53
906 查看
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基本属性详解
- 【iphone应用开发】iphone应用开发之六:UITableView的详细讲解(一)
- 转载【iphone应用开发】iphone应用开发之六:UITableView的详细讲解(一)
- UITableView的详细讲解(一)
- 给 UITableView 添加“下拉刷新(Pull-refresh)”属性
- IOS UITableView 方法及属性学习
- UITableView 详细讲解
- UIScrollView && UITableView相关属性汇总(待续)
- UITableView的详细讲解
- UITableView详细讲解2
- 【iphone应用开发】iphone应用开发之六:UITableView的详细讲解(一)
- 【iphone应用开发】iphone应用开发之六:UITableView的详细讲解(一)
- UITableView 详细讲解