Commit a3a77249 authored by Steven杜宇's avatar Steven杜宇

// 编辑按钮

parent 1090400f
......@@ -72,7 +72,9 @@ class YHFormItemTitleCell: UITableViewCell {
lazy var editButton: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "form_edit"), for: .normal)
btn.setTitle("编辑", for: .normal)
btn.setTitleColor(.brandMainColor, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
btn.tag = editTag
btn.addTarget(self, action: #selector(didClickOperatorBtn(btn:)), for: .touchUpInside)
btn.isHidden = true
......@@ -105,9 +107,9 @@ class YHFormItemTitleCell: UITableViewCell {
}
editButton.snp.makeConstraints { make in
make.size.equalTo(CGSizeMake(24, 24))
make.size.equalTo(CGSizeMake(64, 24))
make.top.equalTo(titleLabel).offset(0)
make.right.equalToSuperview().offset(-18)
make.right.equalToSuperview().offset(0)
}
cancelButton.snp.makeConstraints { make in
......@@ -127,7 +129,7 @@ class YHFormItemTitleCell: UITableViewCell {
case .canEdit:
cancelButton.isHidden = true
editButton.isHidden = false
titleMaxRight = -(horizonalGap+24.0+5.0)
titleMaxRight = -(horizonalGap+46.0+5.0)
case .canCancel:
cancelButton.isHidden = false
editButton.isHidden = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment