TableViewSection¶
- class pyto_ui.TableViewSection(title: str = '', cells: list[TableViewCell] = [])¶
An object representing a section in a Table View. A section has a title and a list of cells contained in.
- property cells: tuple[TableViewCell]¶
Cells contained in the section. After setting a value, the section will be reloaded automatically. The returned value of this property will always be a tuple, so mutating a list of cells won’t trigger a reload.
- Return type:
tuple[TableViewCell]
- property did_delete_cell: callable¶
A function called when a cell contained in the section is deleted. Takes the sender section and the selected deleted cell’s index as parameters. This function should be used to remove the data corresponding to the cell from the database.
- Return type:
callable
- property did_move_cell: callable¶
A function called when a cell contained in the section is moved. Takes the sender section, the moved deleted cell’s index and the destination index as parameters. This function should be used to move the data corresponding to the cell from the database.
- Return type:
callable
- property did_select_cell: callable¶
A function called when a cell contained in the section is selected. Takes the sender section and the selected cell’s index as parameters.
- Return type:
callable
- property did_tap_cell_accessory_button: callable¶
A function called when the accessory button of a cell contained in the section is pressed. Takes the sender section and the cell’s index as parameters.
- Return type:
callable
- property table_view: TableView¶
(Read Only) Returns the Table view associated with the section.
- Return type:
TableView
- property title: str¶
The title of the section displayed on screen.
- Return type:
str