iphone - Pass nsmutablearray from one viewcontroller to another view controller -
here adding values nsmutablearray in firstviewcontroller. when click uibutton want pass array view controller.
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; when passing firstnamearray value appointmentdataarray.
secondviewcontroller *appointmentviewobject = [[secondviewcontroller alloc]initwithnibname:@"secondviewcontroller" bundle:nil]; [appointmentviewobject setappointmentdataarray:firstnamearray]; from above appointmentdataarray returning null value.
[self presentmodalviewcontroller:appointmentviewobject animated:yes]; [appointmentviewobject release];
have allocated array?
nsmutablearray* firstnamearray = [nsmutablearray array];
Comments
Post a Comment