I have a label which is pretty easy. Like this:
let label = UILabel()
label.numberOfLines = 3
label.text = "hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!"
label.snp.makeConstraints { (make) in
make.left.top.equalToSuperview().offset(30)
make.right.equalToSuperview().offset(30)
}
addSubview(label)
I have assigned label.numberOfLines = 3, Now I want to know that the third line's text length. How can I calculate it ? Thanks