【发布时间】:2016-03-16 02:34:59
【问题描述】:
我在下面的代码中有一个indexPath,类型为NSIndexPath
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
在调试器中,indexPath 不显示某些字段,如部分或行。
它尝试po 和p 但它显示了
(lldb) p indexPath.row
error: property 'row' not found on object of
type 'NSIndexPath *' error: 1 errors parsing expression
(lldb) po
indexPath.row error: property 'row' not found on object of type
'NSIndexPath *' error: 1 errors parsing expression
po indexPath
<NSIndexPath: 0xc000000000200416> {length = 2, path = 4 - 1}
【问题讨论】:
-
with po 所有其他值都是 print ?
-
@Vvk 在我的图片中,你会看到部分和行不打印
-
@PhanVănLinh 实际上 PO 用于打印对象,因此它打印整个对象。您正在尝试打印索引路径的一个字段,所以这是不可能的