我使用 Eureka 表单进行快速项目,并且有一个客户行:
这是我的 Xib:
这是我的课:
public class CustomServiceCell : Cell<Bool>, CellType{
@IBOutlet weak var btnDelete: UIButton!
@IBOutlet weak var lblTitle: UILabel!
public override func setup() {
//height = { 60 }
//lblTitle.text = row.title
super.setup()
selectionStyle = .None
//btnDelete.addTarget(self, action: #selector(onDelete), forControlEvents: .TouchUpInside)
}
@IBAction func onDelete(sender: UIButton) {
print("Delete Button tapped")
row.value = true
}
public override func update() {
super.update()
}
}
这就是我将它添加到我的表单的方式:
<<< CustomServiceRow();
我想知道如何传递值来设置按钮文本的名称和标签的文本。
有什么线索吗?