Hey everyone, new forum guy here with a question regarding sections in a Tableview being populated from an XML file.
My XML looks like the following....
<Schedule>
<Month name="October 2009">
<Game>
<Date>
<HomeTeam>
<AwayTeam>
<Time>
<Result>
</Game>
</Month>
<Month name="November 2009">
<Game>
<Date>
<HomeTeam>
<AwayTeam>
<Time>
<Result>
</Game>
</Month>
</Schedule>
I can populate all the <Game> nodes inside the Tableview fine and I am also populating an array of the <Month> names called "months" ("games" is the array for all the games). My question is how can I get a section for each <Month> and then slide the <Game> nodes for that month in the section?
I used NSLog to count each time a month was added it had it return a count of the "months" array. But when I put return [months count]; under numberOfSectionInTableView (I just did this to make sure it was returning the right number of sections), the app crashes so I'm kind of lost.
Anything I have been trying thrown an error or the app crashes so any help is greatly appreciated! Thanks for reading!
--Matt
My XML looks like the following....
<Schedule>
<Month name="October 2009">
<Game>
<Date>
<HomeTeam>
<AwayTeam>
<Time>
<Result>
</Game>
</Month>
<Month name="November 2009">
<Game>
<Date>
<HomeTeam>
<AwayTeam>
<Time>
<Result>
</Game>
</Month>
</Schedule>
I can populate all the <Game> nodes inside the Tableview fine and I am also populating an array of the <Month> names called "months" ("games" is the array for all the games). My question is how can I get a section for each <Month> and then slide the <Game> nodes for that month in the section?
I used NSLog to count each time a month was added it had it return a count of the "months" array. But when I put return [months count]; under numberOfSectionInTableView (I just did this to make sure it was returning the right number of sections), the app crashes so I'm kind of lost.
Anything I have been trying thrown an error or the app crashes so any help is greatly appreciated! Thanks for reading!
--Matt