Help me out with this problem. getting information for array from one class to another controller class
i parsed data from xml....
All the data i stored in an NSMutableArray *eventListArray; its in class DistanceInfo.
in my controller Class CityEventViewController. displayed data in tableview.
ITs working fine..
I do have another Vi开发者_如何学PythonewController Called PopularEventViewController....
when i selected my didSelectRowAtIndexPath.....
Its load my popularEventViewController....
Now i need to display the eventListArray data in popularEventViewController in tableview
when i call [aDistanceInfo.eventListArray count].... in view did load
I need to get that data into popularEventViewController... Please help out.
I hope you can understand my problem..
If you want i will post my code.
@Thanks in advance....
I am no expert, but I would use the appDelegate for this. Declare an NSMutableArray in your appdelegate. Then assign it the value of your first array in CityEvent like so
appDelegate.nameofarraydeclaredinappdelegate = eventListArray; to retrieve the data in your other viewcontroller do this call
nameofnewarrayinpopularEventViewController = appDelegate.nameofarraydeclaredinappdelegate;
精彩评论