contentLabel.preferredMaxLayoutWidth = kScreenWidth - 20
contentLabel.numberOfLines = 0
我使用 SnapKit 设置顶部和左侧。
contentLabel.snp.makeConstraints { (make) in
make.top.equalTo(topView.snp.bottom)
make.left.equalTo(topView.iconView)
}
print(contentLabel.frame.size.height)
它打印 0. 可以吗?