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"
}
}
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
}
Accepted answer is okay but to be better. You can use defaultCallSetup for your all LabelRow, TextAreaRow and others. Do like as below.
LabelRow.defaultCellSetup = {cell, row in
cell.textLabel?.font = UIFont(name: "Your_Custom_font_Name", size: 13)
cell.detailTextLabel?.textColor = UIColor.yellow
cell.textLabel?.numberOfLines = 0
cell.textLabel?.textAlignment = .justified
cell.textLabel?.backgroundColor = UIColor.clear
}
+++ LabelRow(){
$0.title = "Question : Current Occupancy and long text goes"
}
All textLabel attributes can be used just like that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With