NSDictionary遍历

void describeDictionary (NSDictionary *dict)
{
  NSArray *keys;
  int i, count;
  id key, value;

  keys = [dict allKeys];
  count = [keys count];
  for (i = 0; i < count; i++)
  {
    key = [keys objectAtIndex: i];
    value = [dict objectForKey: key];
    NSLog (@"Key: %@ for value: %@", key, value);
  }
}

        NSEnumerator *enumerator = [requestData objectEnumerator];
	id key;
	while ((key = [enumerator nextObject])) {
                NSLog(@"Key:%@,Value:%@",key,[requestData objectForKey:key]);
	}

你可能感兴趣的:(IO)