Ios Swift Eureka:向ButtonRow添加文本值
目前,我通过在单元格中添加标签视图,使用ButtonRow获得此结果:Ios Swift Eureka:向ButtonRow添加文本值,ios,swift,cocoapods,eureka-forms,Ios,Swift,Cocoapods,Eureka Forms,目前,我通过在单元格中添加标签视图,使用ButtonRow获得此结果: ButtonRow的实现在初始化单元格对象时使用UITableViewCellStyle“default”。您可以创建ButtonRow的子类: public final class DetailedButtonRowOf<T: Equatable> : _ButtonRowOf<T>, RowType { public required init(tag: String?) {
ButtonRow的实现在初始化单元格对象时使用UITableViewCellStyle“default”。您可以创建ButtonRow的子类:
public final class DetailedButtonRowOf<T: Equatable> : _ButtonRowOf<T>, RowType {
public required init(tag: String?) {
super.init(tag: tag)
cellStyle = .value1
}
}
public typealias DetailedButtonRow = DetailedButtonRowOf<String>
public final类DetailedButtonRowOf:\u ButtonRowOf,RowType{
公共必需的初始化(标记:字符串?){
super.init(tag:tag)
cellStyle=.value1
}
}
公共类型别名DetailedButtonRow=DetailedButtonRow
然后可以指定行的detailLabelText:
<<< DetailedButtonRow("Email") { row in
row.title = row.tag
row.presentationMode = .segueName(segueName: "AStoryboardSegue", onDismiss: nil)
}.cellUpdate({ (cell, row) in
cell.detailTextLabel?.text = "fakeEmail@email.com"
})
<<< DetailedButtonRow("Email") { row in
row.title = row.tag
row.presentationMode = .segueName(segueName: "AStoryboardSegue", onDismiss: nil)
}.cellUpdate({ (cell, row) in
cell.detailTextLabel?.text = "fakeEmail@email.com"
})