在这里,我将值添加到 firstviewcontroller 中的 nsmutablearray。当我单击 UIButton 时,我想将此数组传递给另一个视图控制器。
AppointmentClass *appObj = [[AppointmentClass alloc]init];
appObj.subject = [key objectForKey:@"Subject"];
appObj.location = [key objectForKey:@"Location"];
appObj.scheduledStart = [key objectForKey:@"ScheduledStart"];
appObj.scheduledEnd = [key objectForKey:@"ScheduledEnd"];
[firstNameArray addObject:appObj];
[appObj release];
appObj=nil;
当我将 firstnamearray 值传递给约会数据数组时。
secondviewcontroller *appointmentViewObject = [[secondviewcontroller alloc]initWithNibName:@"secondviewcontroller" bundle:nil];
[appointmentViewObject setAppointmentDataArray:firstNameArray];
从上面的约会数据数组返回一个空值。
[self presentModalViewController:appointmentViewObject animated:YES];
[appointmentViewObject release];