Commit 29c7e6c7875a4bcd08de1d8f542bde0b965a8a23

Authored by liushiyu
1 parent ee1e1218

提交按钮点击修改

metaCode/Classes/Main/MinePage/View/CNLiveMineInputMessageView.swift
@@ -59,6 +59,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega @@ -59,6 +59,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega
59 moreBtn.frame = CGRect(x: 0, y: 0, width: adapt_length(length: 70), height: adapt_length(length: 30)) 59 moreBtn.frame = CGRect(x: 0, y: 0, width: adapt_length(length: 70), height: adapt_length(length: 30))
60 moreBtn.setTitleColor(HexColor("#B4B4B4"), for: .normal) 60 moreBtn.setTitleColor(HexColor("#B4B4B4"), for: .normal)
61 moreBtn.titleLabel?.font = BoldFont_16_Fit 61 moreBtn.titleLabel?.font = BoldFont_16_Fit
  62 + moreBtn.contentHorizontalAlignment = .right
62 moreBtn.isHidden = true 63 moreBtn.isHidden = true
63 moreBtn.setTitle(_dict["placeholder"] as? String, for: .normal) 64 moreBtn.setTitle(_dict["placeholder"] as? String, for: .normal)
64 if _dict["show_type"] as! String == "3" { 65 if _dict["show_type"] as! String == "3" {
@@ -67,12 +68,26 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega @@ -67,12 +68,26 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega
67 if _dict["show_type"] as! String == "9" { 68 if _dict["show_type"] as! String == "9" {
68 moreBtn.isHidden = false 69 moreBtn.isHidden = false
69 } 70 }
70 - moreBtn.setImage(UIImage(named: "mine_header_message_gray_more"), for: .normal)  
71 - moreBtn.setupButtonImageAndTitlePossitionWith(padding: 0, style: .right)  
72 moreBtn.addTarget(self, action: #selector(checkInAction), for: .touchUpInside) 71 moreBtn.addTarget(self, action: #selector(checkInAction), for: .touchUpInside)
73 return moreBtn 72 return moreBtn
74 }() 73 }()
75 74
  75 + lazy var moreView: UIImageView = {
  76 + let moreView = UIImageView.init()
  77 + moreView.contentMode = .scaleAspectFill
  78 + moreView.clipsToBounds = true
  79 + moreView.backgroundColor = .white
  80 + moreView.image = UIImage(named: "mine_header_message_gray_more")
  81 + moreView.isHidden = true
  82 + if _dict["show_type"] as! String == "3" {
  83 + moreView.isHidden = false
  84 + }
  85 + if _dict["show_type"] as! String == "9" {
  86 + moreView.isHidden = false
  87 + }
  88 + return moreView
  89 + }()
  90 +
76 lazy var switchView: UISwitch = { 91 lazy var switchView: UISwitch = {
77 let switchView = UISwitch.init() 92 let switchView = UISwitch.init()
78 switchView.isOn = false 93 switchView.isOn = false
@@ -195,6 +210,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega @@ -195,6 +210,7 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega
195 make.centerY.equalToSuperview() 210 make.centerY.equalToSuperview()
196 } 211 }
197 make.left.equalToSuperview().offset(10) 212 make.left.equalToSuperview().offset(10)
  213 + make.width.lessThanOrEqualTo(adapt_length(length: 150))
198 } 214 }
199 addSubview(contentTextField) 215 addSubview(contentTextField)
200 contentTextField.snp.makeConstraints { make in 216 contentTextField.snp.makeConstraints { make in
@@ -226,12 +242,20 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega @@ -226,12 +242,20 @@ class MineInputTextShopCustomView: UIView, UITextViewDelegate, UITextFieldDelega
226 make.top.equalTo(nameLabel.snp.bottom).offset(10) 242 make.top.equalTo(nameLabel.snp.bottom).offset(10)
227 make.bottom.equalTo(bottem_line.snp.top).offset(10) 243 make.bottom.equalTo(bottem_line.snp.top).offset(10)
228 } 244 }
  245 +
  246 + addSubview(moreView)
  247 + moreView.snp.makeConstraints { make in
  248 + make.centerY.equalToSuperview()
  249 + make.height.equalTo(adapt_length(length: 20))
  250 + make.width.equalTo(adapt_length(length: 16))
  251 + make.right.equalToSuperview().offset(-adapt_length(length: 10))
  252 + }
229 253
230 addSubview(moreBtn) 254 addSubview(moreBtn)
231 moreBtn.snp.makeConstraints { make in 255 moreBtn.snp.makeConstraints { make in
232 make.centerY.equalToSuperview() 256 make.centerY.equalToSuperview()
233 - make.right.equalToSuperview().offset(-10)  
234 - make.left.equalTo(nameLabel.snp.right).offset(10) 257 + make.right.equalTo(moreView.snp.left).offset(-adapt_length(length: 5))
  258 + make.left.equalTo(nameLabel.snp.right).offset(adapt_length(length: 10))
235 } 259 }
236 260
237 addSubview(switchView) 261 addSubview(switchView)