Help with loading text into a tableview from an array
hey people im having trouble with loading my array of strings into a tableview , what i have already done is read in information from an xml file and stored the data i need into an array of elements called title, now what i want to do is load up the titles into the table view so the user can choose one of the option and move forward from there , now my problem is that when i load up the table view it comes up blank, i ran the program through the debugger and what is happening is after the program runs the view did load method it jumps straight into the functions to setup the tableView, now my question is is there a way for me to manipulate the program so that all the information gets parsed before the tableview gets loaded up and then load up the tableview and see all the data i need to display into the cell?
is there a way for me to manipulate the program so that all the information gets parsed before the tableview gets loaded up and then load up the tableview and see all the data i need to display into the cell?
I don't want to be rude at all, but I really think you could have found the answer to this question by googling "load tableview iPhone" but I will tell you anyway .
The table view will get loaded when the view is loaded which is totally fine, because the cells get loaded separately and it is in the cells that you want to take the values from your array and display them.
Soo...... If you have an array "myArray" then you would implement this to load the data in each cell
i already have the code u posted in my code , what i did was placed breakpoints in all the functions i have in my code and when it starts it goes from viewDidLoad to the numberOfRowsInSection method which is supposed to count the amount of objects in the array, only problem is when i check whats in the array when numberOfRowsInSection executes the array is empty , its because the parser is running after this method is called and since the znumberOfRowsInSection is not returning an integer it never executes the cellForRowAtIndexPath method. how can i load up the xml file and read it into the array before i place the values into the table?