Closed hanks-hu closed 4 years ago
Doesn't it work?
lazy var tableView = UITableView(frame: .zero, style: .plain).then {
$0.backgroundColor = UIColor.white
$0.dataSource = self
$0.delegate = self
}
😂,sorry,It's my problem。But, I found another problem。Code hinting。 Xcode Version 10.1 (10B61)。
@devxoul Hi, sorry to bother you. Any updates about Carthage support?
@HanksHu did your Xcode give you the hint now?
@iTofu sorry.
use let
, give me hints.
let orderNumLabel = UILabel().then {
}
but,uselazy var
, Don't give me hints.
lazy var orderNumLabel = UILabel().then {
$0.textColor = UIColor.init(hex: "b7b7b7")
$0.numberOfLines = 1
}
@HanksHu fine and thank you :(
@HanksHu
me too
use let
, give me hints. uselazy var
, Don't give me hints.
lazy var tableView: UITableView = { let tabView =UITableView.init(frame: .zero, style: .plain) tabView.backgroundColor = UIColor.white tabView.dataSource = self tabView.delegate = self return tabView }() I often use lazy loading, and,how to write by Then。Can you give me a test code。