1
我遇到NSDictionary for循環的問題。字典被稱爲「海灘」,但在循環內海灘未申報。這裏的代碼在obj c中聲明爲未使用的標識符,即使它聲明爲
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
NSString *jsonString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSArray *results = [jsonString JSONValue];
for (NSDictionary *beach in results); //beach is flagged as unused
{
NSString *Name = [beach objectForKey:@"Name"]; //beach is flagged as undeclared
NSLog(Name);
}
}
任何建議將是偉大的。
尼斯一個,不能相信我錯過了! – Marushiru 2014-08-28 14:44:02