I am developing an application that shows all the courses that take place in a class room depending on the time and date. In the prototype I was thinking to implement a UITableView, with two sections, one for previous clases(top) and one for next classes. I want to add the previous button as the header of the section with following classes and when I press it I want to programatically add a new section and populate it with the previous courses. I am not sure how to implement this, what methods I should override, etc.
I found something quite similar but I couldn’t find any details of how he actually implemented it.
Thank you.

You will need to read up on UITableViews and the delegate methods. The sections are controlled in:
You can put conditional logic here to control how many sections you need. Button pressed calls [tableView reloadData]; and will update the sections with it. How you control the data going into the table is up to you, but this should get you started.