ここでは、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];