无论我的数组中有多少项,count
总是返回 1。_contentData
数组来自 Json 响应:
_contentData = [[NSMutableArray alloc] initWithObjects:JSON, nil];
数组(_contentData):
(
(
{
id = 1;
name = "Entry 1";
},
{
id = 2;
name = "Entry 2";
},
{
id = 3;
name = "Entry 3";
}
)
)
代码:
NSLog(@"%lu", (unsigned long)_contentData.count);
输出:
2013-04-26 18:32:00.968 SP[23542:c07] 1