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

// 家庭

parent 4b73c763
......@@ -118,7 +118,8 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < items.count {
let vc = YHFamilyInfoUpdateViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
......
......@@ -41,6 +41,7 @@ class YHInfoItemView: UIView {
tf.font = UIFont.PFSC_M(ofSize: 14)
tf.textColor = UIColor.mainTextColor
tf.isHidden = true
tf.delegate = self
return tf
}()
......@@ -110,13 +111,13 @@ class YHInfoItemView: UIView {
detailLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(-18.0-rightBtnWidth-18.0)
make.right.equalTo(-18.0-rightBtnWidth)
}
textField.snp.makeConstraints { make in
make.top.equalTo(0)
make.left.equalTo(detailLabel)
make.right.equalTo(-18.0-rightBtnWidth-18.0)
make.right.equalTo(-18.0-rightBtnWidth)
make.height.equalTo(52)
}
......@@ -186,7 +187,7 @@ class YHInfoItemView: UIView {
detailLabel.snp.remakeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(item.isEditMode ? -18.0-rightBtnWidth-18.0 : 0)
make.right.equalTo(item.isEditMode ? -18.0-rightBtnWidth : 0)
if isTextEdit {
make.height.equalTo(20)
}
......@@ -202,3 +203,22 @@ class YHInfoItemView: UIView {
}
}
}
extension YHInfoItemView: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isEmpty == true { // 点击删除
return true
}
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
// if newText.count > Self.maxWordsCount {
// YHHUD.flash(message: "限制最多\(Self.maxWordsCount)个字符")
// return false
// }
self.item.detail = newText
return true
}
}
......@@ -338,7 +338,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
}
if true {
let vc = YHFamilyInfoUpdateViewController()
let vc = YHFamilyInfoConfirmViewController()
self.navigationController?.pushViewController(vc)
return
}
......
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