key and value

NSDictionary *theDict1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:[NSMutableArray array], @"Data",
                                 NSLocalizedString(@"string1", @""), @"Name", nil];
   
  NSDictionary *theDict2 = [NSMutableDictionary dictionaryWithObjectsAndKeys:[NSMutableArray array], @"Data",

                                      NSLocalizedString(@"string2", @""), @"Name", nil];

NSMutableDictionary *data =  [[NSDictionary alloc] initWithObjectsAndKeys:theDict1, @"Dict1", theDict2, @"Dict2",nil];

 

NSMutableArray *theData1 = [[self.data objectForKey:@"Dict1"] objectForKey:@"Data"];
    [theData1 removeAllObjects];
   
    NSMutableArray *theData2 = [[self.data objectForKey:@"Dict2"] objectForKey:@"Data"];
    [theData2 removeAllObjects];

 

for () {
            if () {
                [theData1 addObject:vo];
            } else if () {
                [theData2 addObject:vo];
            }
        }

 

posted on 2011-03-08 11:24  fairycao  阅读(244)  评论(0编辑  收藏  举报