目前,我通过向单元格添加标签视图来使用 ButtonRow 获得此结果:
<<< ButtonRow("Email") {
$0.title = $0.tag
$0.presentationMode = PresentationMode.Show(...)
}.cellSetup {
cell, row in
let text = UILabel(frame: cell.frame)
text.frame.size.width = 0.909 * currentScreenWidth - 68
text.frame.origin.x = 68
text.textColor = UIColor(red: 142/255, green: 142/255, blue: 147/255, alpha: 1)
text.textAlignment = .Right
text.text = "fakeEmail@email.com"
cell.addSubview(text)
}
我正在使用 ButtonRow,因为它最后有那个小“>”,并且在以编程方式呈现新视图和视图控制器时效果很好。
使用$0.value = "Some String"
不起作用,就像它与其他属性一样。
无论如何,无需手动添加标签视图就可以做到这一点?它适用于所有屏幕,但我认为手动设置这些参数并不安全。