Commit 317bbf72 authored by David黄金龙's avatar David黄金龙

赴港计划书修改

parent 89e2d20f
......@@ -216,12 +216,18 @@ private extension YHHKPlanItemView {
}
if model.type == .planOther {
maxNumbler = 500
maxNumbler = 300
} else {
maxNumbler = 300
}
tipsLable.text = tipsTxt
myTextView.text = getFuckString(string: model.content)
// print("原始数据: " + model.content)
let ttt = getFuckString(string: model.content)
// print("之后数据: " + ttt)
myTextView.text = ttt
let textNum = calcTextLength(string: myTextView.text)
numberLabel.text = textNum.string + "/\(maxNumbler)"
......@@ -396,7 +402,7 @@ extension YHHKPlanItemView : UITextViewDelegate {
return true
}
var newLength = calcTextLength(string: textView.text)
let newLength = calcTextLength(string: textView.text)
return newLength <= maxNumbler - 1
}
......@@ -411,16 +417,16 @@ extension YHHKPlanItemView : UITextViewDelegate {
printLog(text.count)
if text.count <= maxNumbler{
model.content = text
} else {
var ttt = text
let subString = ttt.slice(from: 0, length: maxNumbler)
model.content = subString
}
// if text.count <= maxNumbler{
// model.content = text
// } else {
// var ttt = text
// let subString = ttt.slice(from: 0, length: maxNumbler)
//
// model.content = subString
// }
model.content = text
if txtNum > maxNumbler {
numberLabel.textColor = .failColor
} else {
......
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