【发布时间】:2026-01-21 04:55:02
【问题描述】:
基本上,我将数组的索引存储在 NSInteger 中。我现在需要它作为 NSIndexpath,我正在努力寻找并找到一种将我的 NSInteger 转换为 NSIndexpath 的方法,以便我可以重用它。
【问题讨论】:
-
您需要
NSIndexPath做什么?你需要UITableView吗? -
在调用sqlite的更新语句时使用。我想我现在转换为 NSIndexPath 但我需要 NSIndexPath.row 这会引发错误。有什么想法吗?
-
您可以不在使用
indexPathWithIndex:创建的索引路径上调用row。创建索引路径可以调用row,可以使用indexPathForRow:inSection:。
标签: ios objective-c nsindexpath nsinteger