Difference between section and row TableView
I'm trying to understand the difference between a section and a row in a TableView. When a create a datasource with e.g. 3 items and query the tableview_number_of_sections the answer is three. When I query the tableview_number_of_rows, then the answer is one, so one row in each section. My expectation however was: one section, 3 rows. So, can someone explain the difference between section and row and how they can be used within a TableView?
Sections are groups of rows, so for example in a file list you could have the sections "folders", "documents", "images", "sound", "videos". If you want a list without section headers, make
I'm not sure what you mean by "when I create a datasource" - are you using
ui.ListDataSourceor are you writing your own data source class? As far as I know
ListDataSourcedoesn't support sections. If you're creating a custom data source, make sure that you inherit from
objectand that you implement all methods listed in the documentation.
OK, thanks, this makes things more clear to me. Yes, I've created a custom data source with the necessary methods, however
tableview_number_of_sectionsdoes not return 1 and that's what I need.