我是有myclass.m 4个阵列问题正从一个级阵列到另一个类
我需要得到这些阵列到myclassviewcontroller.m
对于我像myclassviewcontroller.m编写代码这个。
- (void)resultarrays :(NSMutableArray *)Agentids loanofficerid:(NSMutableArray *)Loanofficerid agentname:(NSMutableArray *)agentname agentemail:(NSMutableArray *)agentemail agentphone:(NSMutableArray *)Agentphone {
agentids = [[NSMutableArray alloc] initWithObjects:Agentids,nil];
loanofficerid = [[NSMutableArray alloc] initWithObjects:Loanofficerid,nil];
agentnames = [[NSMutableArray alloc] initWithObjects:agentname,nil];
agentemails = [[NSMutableArray alloc] initWithObjects:agentemail,nil];
agentphone = [[NSMutableArray alloc] initWithObjects:Agentphone,nil];
NSLog(@"123 %@",agentids);
NSLog(@"123 %@",loanofficerid);
NSLog(@"123 %@",agentnames);
NSLog(@"123 %@",agentphone);
}
在myclass.m我写这篇文章
myclassviewcontroller *LOVobj = [[myclassviewcontroller alloc]init];
[LOVobj resultarrays:resultData_agent loanofficerid:array1 agentname:array2 agentemail:array3 agentphone:array4];
然后它会显示我在控制台打印的所有对象。
在此之后,在按钮单击我打印这些数组,然后它打印空。
即使我给它分配setter和getter方法。
我没有什么问题可以任何人请帮助我。
谢谢你提前。
查看按钮单击后打印的代码会很有帮助。 – Bogatyr 2011-02-15 10:33:14