“Parse Issue Expected']'”

时间:2015-03-23 21:39:01

标签: ios objective-c

我在网上看过,但没有一个解决方案有所作为。

for (int i = 0; i < posts.count; i++) {
    quotesArray addObject: [((NSDictionary *)(posts[i])) objectForKey:@"quote"];
    personArray addObject: [((NSDictionary *)(posts[i])) objectForKey:@"person"];
}

问题出在第二和第三行。有什么问题?

1 个答案:

答案 0 :(得分:6)

在向阵列添加对象时忘记了一些括号:

[quotesArray addObject: [((NSDictionary *)(posts[i])) objectForKey:@"quote"]];
[personArray addObject: [((NSDictionary *)(posts[i])) objectForKey:@"person"]];