There are some samples for other rows but ButtonRow is not well explained in the sample project. Would be super nice to have a bit betted documentation for use cases. E.g how I call an action on a button row.
I use it like this:
Create the button row:
ButtonRow() {
$0.title = "Tap Me!"
$0.onCellSelection(self.buttonTapped)
}
And provide a handler in your form class:
func buttonTapped(cell: ButtonCellOf<String>, row: ButtonRow) {
print("tapped!")
}
Thanks, it works!
How do you call a segue from a ButtonRow?
For a segue
ButtonRow("Rows") {
$0.presentationMode = .SegueName(segueName: "NameOfSegue", completionCallback: nil)
}
Most helpful comment
I use it like this:
Create the button row:
And provide a handler in your form class: