Andrey M. Andrey M. - 5 months ago 52
iOS Question

How to make multiline label with Eureka

I use Eureka library and i encountered a problem. I need a multiline label row but don't know how to do it. I can see only one-line with truncation label rows.

class MainViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()

form +++=

Section()

<<< LabelRow { row in
row.title = "Hello World 1. Hello World 2. Hello World 3"
}
}

Answer

With row.cell you get the whole cell and you can customize it.

The label row should like something like this:

<<< LabelRow { row in
    row.title = "Hello World 1. Hello World 2. Hello World 3"
    row.cell.textLabel?.numberOfLines = 0
}
Comments