【发布时间】:2013-04-30 08:47:02
【问题描述】:
我正在尝试将 nsindexpath 添加到数组中 .. 我只能添加一个 indexpath 。如果我尝试将另一个 indexpath 添加到数组中 ..调试器仅显示最新的 indexpath 。
for (int i = 0 ; i<[notificationArray count]; i++)
{
selectedSymptIndexPath = [NSIndexPath indexPathForRow:selectedSymptomIndex inSection:keyIndexNumber];
selectedSympIPArray = [[NSMutableArray alloc]init];
[selectedSympIPArray addObject:selectedSymptIndexPath];
}
即使我尝试将 [selectedSympIPArray addObject:selectedSymptIndexPath]; 放在 for 循环之外,它仍然只添加最新的索引路径而不是显示多个索引路径
【问题讨论】:
标签: iphone ios objective-c nsmutablearray nsindexpath