Commit 98b3698474415a6d41fae139ceba2ec8d04f2ef5
1 parent
c96a13f6
自我简介 -换行
Showing
1 changed file
with
23 additions
and
7 deletions
metaCode/Classes/Main/HomePage/Controller/DigitalAuth/数字简历相关页面/CNLiveDigitalResumePreViewMineJianJieController.swift
| @@ -52,19 +52,26 @@ class CNLiveDigitalResumePreViewMineJianJieController:CNLiveBaseViewController, | @@ -52,19 +52,26 @@ class CNLiveDigitalResumePreViewMineJianJieController:CNLiveBaseViewController, | ||
| 52 | nextBtn.addTarget(self, action: #selector(addWorkBtnAction), for: .touchUpInside) | 52 | nextBtn.addTarget(self, action: #selector(addWorkBtnAction), for: .touchUpInside) |
| 53 | return nextBtn | 53 | return nextBtn |
| 54 | }() | 54 | }() |
| 55 | + lazy var textBgView :UIView = { | ||
| 56 | + let bottomNavView = UIView() | ||
| 57 | + bottomNavView.backgroundColor = .white | ||
| 58 | + bottomNavView.layer.masksToBounds = true | ||
| 59 | + bottomNavView.layer.cornerRadius = 12 | ||
| 60 | + return bottomNavView | ||
| 61 | + }() | ||
| 62 | + | ||
| 55 | lazy var textView: QMUITextView = { | 63 | lazy var textView: QMUITextView = { |
| 56 | let textView = QMUITextView.init(frame: .zero) | 64 | let textView = QMUITextView.init(frame: .zero) |
| 57 | textView.backgroundColor = HexColor("#FFFFFF") | 65 | textView.backgroundColor = HexColor("#FFFFFF") |
| 58 | textView.font = Font_15 | 66 | textView.font = Font_15 |
| 59 | textView.textColor = HexColor("#333333") | 67 | textView.textColor = HexColor("#333333") |
| 60 | textView.placeholderColor = HexColor("#999999") | 68 | textView.placeholderColor = HexColor("#999999") |
| 61 | - textView.placeholderMargins = UIEdgeInsets(top: 0, left: 5, bottom: 00, right: 5) | 69 | + textView.placeholderMargins = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5) |
| 62 | textView.placeholder = "请输入自我介绍" | 70 | textView.placeholder = "请输入自我介绍" |
| 63 | - textView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) | 71 | +// textView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) |
| 64 | textView.textAlignment = .left | 72 | textView.textAlignment = .left |
| 65 | - textView.layer.masksToBounds = true | ||
| 66 | - textView.layer.cornerRadius = 12 | ||
| 67 | textView.delegate = self | 73 | textView.delegate = self |
| 74 | + textView.returnKeyType = .done | ||
| 68 | return textView | 75 | return textView |
| 69 | }() | 76 | }() |
| 70 | lazy var huoJiangNumberLabel : UILabel = { | 77 | lazy var huoJiangNumberLabel : UILabel = { |
| @@ -124,14 +131,22 @@ class CNLiveDigitalResumePreViewMineJianJieController:CNLiveBaseViewController, | @@ -124,14 +131,22 @@ class CNLiveDigitalResumePreViewMineJianJieController:CNLiveBaseViewController, | ||
| 124 | make.height.equalTo(40) | 131 | make.height.equalTo(40) |
| 125 | } | 132 | } |
| 126 | 133 | ||
| 127 | - self.view.addSubview(self.textView) | ||
| 128 | - self.textView.snp.makeConstraints { make in | 134 | + self.view.addSubview(self.textBgView) |
| 135 | + self.textBgView.snp.makeConstraints { make in | ||
| 129 | make.left.equalTo(15) | 136 | make.left.equalTo(15) |
| 130 | make.right.equalToSuperview().offset(-15) | 137 | make.right.equalToSuperview().offset(-15) |
| 131 | make.bottom.equalTo(self.addWorkBtn.snp.top).offset(-15) | 138 | make.bottom.equalTo(self.addWorkBtn.snp.top).offset(-15) |
| 132 | make.top.equalTo(self.yuanmaDescLabel.snp.bottom).offset(42) | 139 | make.top.equalTo(self.yuanmaDescLabel.snp.bottom).offset(42) |
| 133 | } | 140 | } |
| 134 | - self.textView.addSubview(self.huoJiangNumberLabel) | 141 | + |
| 142 | + self.textBgView.addSubview(self.textView) | ||
| 143 | + self.textView.snp.makeConstraints { make in | ||
| 144 | + make.left.equalTo(20) | ||
| 145 | + make.right.equalToSuperview().offset(-20) | ||
| 146 | + make.bottom.equalToSuperview().offset(-41) | ||
| 147 | + make.top.equalTo(20) | ||
| 148 | + } | ||
| 149 | + self.textBgView.addSubview(self.huoJiangNumberLabel) | ||
| 135 | self.huoJiangNumberLabel.snp.makeConstraints { make in | 150 | self.huoJiangNumberLabel.snp.makeConstraints { make in |
| 136 | make.width.equalTo(200) | 151 | make.width.equalTo(200) |
| 137 | make.bottom.equalToSuperview().offset(-21) | 152 | make.bottom.equalToSuperview().offset(-21) |
| @@ -159,6 +174,7 @@ class CNLiveDigitalResumePreViewMineJianJieController:CNLiveBaseViewController, | @@ -159,6 +174,7 @@ class CNLiveDigitalResumePreViewMineJianJieController:CNLiveBaseViewController, | ||
| 159 | 174 | ||
| 160 | func textViewShouldReturn(_ textView: QMUITextView!) -> Bool { | 175 | func textViewShouldReturn(_ textView: QMUITextView!) -> Bool { |
| 161 | self.introduce = textView.text ?? "" | 176 | self.introduce = textView.text ?? "" |
| 177 | + self.textView.resignFirstResponder() | ||
| 162 | return true | 178 | return true |
| 163 | } | 179 | } |
| 164 | func textViewDidChange(_ textView: UITextView) { | 180 | func textViewDidChange(_ textView: UITextView) { |