【发布时间】:2011-09-08 01:53:11
【问题描述】:
我被这个难住了,我在数组中设置了对象,但是当我在它们都设置好后检查它时,它显示为 (null)
for (int i = 0; i < [lines count]; i+=2) {
[terms addObject:[lines objectAtIndex:i]];
NSLog(@"%@",[terms objectAtIndex:i]);
}
我做错了吗? terms在header中声明,设置为属性,合成为NSMutableArray
【问题讨论】:
-
你初始化terms数组了吗?
-
您确定 [lines objectAtIndex:i] 正在返回您认为的内容吗?
标签: iphone objective-c ios arrays