Eureka: Q: ButtonRow configuration

Created on 9 Nov 2016  路  1Comment  路  Source: xmartlabs/Eureka

Hi

How to configure a ButtonRow cell to open a safari link?
And the alignment should be left.

thanks

Most helpful comment

In case anyone was wondering:

        <<< ButtonRow() { row in
            row.title = "Share"
            row.cell.imageView?.image = #imageLiteral(resourceName: "shareSquare")
            row.cell.accessoryView = UIImageView(image: #imageLiteral(resourceName: "arrow"))

            row.cell.height = { return self.cellHeight }
            }.cellUpdate({ (cell, _) in
                cell.textLabel?.textAlignment = .left
            }).onCellSelection({ (cell, row) in
                self.openSafari() // add code to open safari here or create a new function
            })

>All comments

In case anyone was wondering:

        <<< ButtonRow() { row in
            row.title = "Share"
            row.cell.imageView?.image = #imageLiteral(resourceName: "shareSquare")
            row.cell.accessoryView = UIImageView(image: #imageLiteral(resourceName: "arrow"))

            row.cell.height = { return self.cellHeight }
            }.cellUpdate({ (cell, _) in
                cell.textLabel?.textAlignment = .left
            }).onCellSelection({ (cell, row) in
                self.openSafari() // add code to open safari here or create a new function
            })
Was this page helpful?
0 / 5 - 0 ratings