views:

20

answers:

0

Ok so heres my problem, i have to read in a list of data from an xml file which i have done, now i have to load up the title from each peice of data into the tableView's list, now this is where i need my help, ok with in my view did load method i create the connection in order to connect to the server i need to, that works fine, now my problem is when the viewDidMethod is done the program calls the numberOfRowsInSection method, and if the numberOfRows method returns a value it goes to the cellForRowAtIndexPath method, and my program never completes this action, now i know why, its because since the 3 functions are called in that order the function i need to do the xmlParsing gets called after those functions are done, and since the parsing is done after the set up the cell mothods are called nothing is put into the array untill after the cell moethods are called, now i can only think about 2 differnt ways of fixing this problem, 1)create a new class for the xml file itself and try and call those functions with in the viewDidLoad method of where the tableView will be set up or (but i dont know how to do that since i dont know how to call functions from one class in the other) or i am trying to figure out a way to change the order the way the functions are called in the tableSetUpController. can someone explain which one of the ways would be more efficant or even just tell me how to it another way entriely?