Commit 4b73b42f authored by pete谢兆麟's avatar pete谢兆麟

UI问题修改

parent 9b7ae4d6
...@@ -134,7 +134,7 @@ class YHOtherLoginViewController: YHBaseViewController { ...@@ -134,7 +134,7 @@ class YHOtherLoginViewController: YHBaseViewController {
vc.backLocationStringController = { (country) in vc.backLocationStringController = { (country) in
self.country = country self.country = country
self.countryMessageView.messageButton.setTitle(country.name, for: .normal) self.countryMessageView.messageButton.setTitle(country.name, for: .normal)
self.phoneMessageView.messageButton.setTitle("+\(country.code)", for: .normal) self.phoneMessageView.messageButton.text = "+\(country.code)"
} }
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} }
......
...@@ -391,7 +391,7 @@ extension YHSelectPhoneCountryViewController: UITableViewDelegate, UITableViewDa ...@@ -391,7 +391,7 @@ extension YHSelectPhoneCountryViewController: UITableViewDelegate, UITableViewDa
if tableView == searchTableView { if tableView == searchTableView {
return nil return nil
} }
return sections[section] return " " + sections[section]
} }
// MARK: - Section Index // MARK: - Section Index
......
...@@ -13,7 +13,7 @@ class YHPhoneMessageView: UIView { ...@@ -13,7 +13,7 @@ class YHPhoneMessageView: UIView {
typealias Block = () -> () typealias Block = () -> ()
var block: Block? var block: Block?
var phoneBlock: PhoneBlock? var phoneBlock: PhoneBlock?
var messageButton: UIButton! var messageButton: UILabel!
var titleButton: UIButton! var titleButton: UIButton!
var phoneTextField: UITextField! var phoneTextField: UITextField!
...@@ -45,26 +45,23 @@ class YHPhoneMessageView: UIView { ...@@ -45,26 +45,23 @@ class YHPhoneMessageView: UIView {
} }
messageButton = { messageButton = {
let button = UIButton(type: .custom) let button = UILabel()
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16) button.font = UIFont.PFSC_R(ofSize: 16)
button.setTitle("+86", for: .normal) button.text = "+86"
button.setTitleColor(UIColor(hex: 0x8993a2), for: .normal) button.textColor = UIColor(hex: 0x8993a2)
button.addTarget(self, action: #selector(messageClick), for: .touchUpInside)
button.contentHorizontalAlignment = .left
return button return button
}() }()
addSubview(messageButton) addSubview(messageButton)
messageButton.snp.makeConstraints { make in messageButton.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalTo(105) make.left.equalTo(105)
make.width.equalTo(40)
make.height.equalTo(20) make.height.equalTo(20)
make.centerY.equalToSuperview()
} }
phoneTextField = { phoneTextField = {
let text = UITextField() let text = UITextField()
text.placeholder = "请输入您的手机号" text.placeholder = "请输入您的手机号"
text.font = UIFont(name: "DINAlternate-Bold", size: 18) text.font = UIFont.PFSC_R(ofSize: 18)
text.textColor = UIColor.mainTextColor text.textColor = UIColor.mainTextColor
text.textAlignment = .left text.textAlignment = .left
text.keyboardType = .phonePad text.keyboardType = .phonePad
...@@ -78,7 +75,6 @@ class YHPhoneMessageView: UIView { ...@@ -78,7 +75,6 @@ class YHPhoneMessageView: UIView {
make.top.bottom.equalToSuperview() make.top.bottom.equalToSuperview()
make.left.equalTo(messageButton.snp.right).offset(16) make.left.equalTo(messageButton.snp.right).offset(16)
make.height.equalTo(20) make.height.equalTo(20)
make.right.equalToSuperview()
} }
let lineone = UIView() let lineone = UIView()
lineone.backgroundColor = UIColor(hex: 0xf0f3f7, alpha: 0.8) lineone.backgroundColor = UIColor(hex: 0xf0f3f7, alpha: 0.8)
...@@ -97,6 +93,7 @@ class YHPhoneMessageView: UIView { ...@@ -97,6 +93,7 @@ class YHPhoneMessageView: UIView {
make.bottom.left.right.equalToSuperview() make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5) make.height.equalTo(0.5)
} }
} }
@objc func messageClick() { @objc func messageClick() {
......
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