In this tutorial, I use a tableview with two buttons and two labels. I dynamically generate rows and sections and reload the data in the tableview. I show how to use indexPath.section and indexPath.row to distinguish between what section is selected and what row is selected and display that selection information on the two labels.