Eureka: How to use the ButtonCell

Created on 12 Oct 2015  路  4Comments  路  Source: xmartlabs/Eureka

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.

onCellSelection documentation ButtonRow

Most helpful comment

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!")
    }

All 4 comments

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)
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

annjawn picture annjawn  路  3Comments

zoul picture zoul  路  3Comments

jaylyerly picture jaylyerly  路  3Comments

Tomas1405 picture Tomas1405  路  3Comments

sedwo picture sedwo  路  3Comments