TablesDataSource
public protocol TablesDataSource
A protocol that helps you communicate and interact with the values in Tables
-
Get the value of a cell at a specific address
Declaration
Swift
func valueOfCell(x: Int, y: Int) -> CellValue
Parameters
x
The x coordinate of the cell. For example, when the parser sees
B4
, it will call this function withx = 1
asB
is the second letter in the alphabet and we start from 0y
The x coordinate of the cell. For example, when the parser sees
B4
, it will call this function withy = 3
as we start from 0. -
Updates the value of the cell at a specific address
Declaration
Swift
func updateCell(content: CellValue, x: Int, y: Int)
Parameters
content
The content of the updated cell.
x
The x coordinate of the cell. For example, when we want to update
B4
, it will call this function withx = 1
asB
is the second letter in the alphabet and we start from 0y
The x coordinate of the cell. For example, when we want to update
B4
, it will call this function withy = 3
as we start from 0.