Commit 3782f95f authored by pete谢兆麟's avatar pete谢兆麟

细节修改

parent 9e266f14
......@@ -18,7 +18,7 @@ import UIKit
class YHFileRenameInputView: UIView {
static let height = 217.0
static let maxWordsCount = 30
var maxWordsCount = 30
var editBlock:((String?)->Void)?
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
......@@ -115,6 +115,9 @@ class YHFileRenameInputView: UIView {
view.textField.text = defalutText
view.textField.attributedPlaceholder = NSAttributedString(string: placeholde, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
view.titleLabel.text = title
if placeholde == "请输入自定义标签" {
view.maxWordsCount = 10
}
return view
}
......@@ -217,9 +220,9 @@ extension YHFileRenameInputView: UITextFieldDelegate {
return true
}
var newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if newText.count > Self.maxWordsCount {
YHHUD.flash(message: "重命名限制最多30个字符")
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if newText.count > self.maxWordsCount {
YHHUD.flash(message: "重命名限制最多\(maxWordsCount)个字符")
return false
}
return true
......
......@@ -58,7 +58,6 @@ class YHEditInterestViewController: YHBaseViewController {
let layout = YHSearchItemLayout()
layout.scrollDirection = .vertical
layout.minimumInteritemSpacing = 12
// 创建集合视图
let collectView = UICollectionView(frame:.zero, collectionViewLayout: layout)
collectView.delegate = self
......
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