Dan*_*Dan 38 objective-c nsinteger nsindexpath ios
基本上我在NSInteger中存储数组的索引.我现在需要它作为NSIndexpath,我很难看到并找到一种方法将我的NSInteger转换为NSIndexpath,所以我可以重用它.
age*_*ped 89
对于int index:
NSIndexPath *path = [NSIndexPath indexPathWithIndex:index];
Run Code Online (Sandbox Code Playgroud)
创建节点0中项目的索引以指向根据引用.
要在a中使用indexPath UITableView,更合适的方法是
NSIndexPath *path = [NSIndexPath indexPathForRow:row inSection:section];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
38893 次 |
| 最近记录: |