它如何影响一个数组到另一个数组

时间:2011-03-29 10:26:41

标签: iphone objective-c

-(IBAction)Done :(id) sender {

    NSMutableArray *addinfo = [[NSMutableArray alloc]init]; 

    AddinfoCarteV *addinfoCarteV =[[AddinfoCarteV alloc]initWithNibName:@"AddinfoCarteV" bundle:nil]; 
    [addinfo addObject:textfieldToAdd.text]; 
    NSLog(@"%@",addinfo); 
    addinfoCarteV.informationMan = addinfo ; 
    textfieldToAdd.hidden= NO ; 
}

1 个答案:

答案 0 :(得分:1)

请尝试清楚地提问。我认为您需要分配和初始化addinfoCarteV.informationMan数组。如果要将addinfo数组复制到informationMan数组,请尝试此代码

addinfoCarteV.informationMan = [[NSMutableArray alloc] init];

[addinfoCarteV.informationMan addObjectsFromArray:addinfo];