Browse Source

发布标题隐藏键盘问题

jsonwang 3 years ago
parent
commit
cbb58c4d57

+ 8 - 1
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointPublicController.swift

@@ -1496,7 +1496,14 @@ extension PQStuckPointPublicController {
         PQBaseViewModel.getBaseConfig(completeHander: { [weak self] titles in
         PQBaseViewModel.getBaseConfig(completeHander: { [weak self] titles in
 
 
             if (titles?.count ?? 0) > 0 {
             if (titles?.count ?? 0) > 0 {
-                self?.publicTitleView.titles = titles!
+                var temp:Array<String> = titles!
+                if((titles?.count ?? 0) <= 13){
+                    for _ in 0 ... (13 - (titles?.count ?? 0)){
+                        temp.append("")
+                    }
+                }
+           
+                self?.publicTitleView.titles = temp
 
 
                 let numberRandom: UInt32 = UInt32(arc4random_uniform(UInt32(titles!.count)))
                 let numberRandom: UInt32 = UInt32(arc4random_uniform(UInt32(titles!.count)))
                 BFLog(message: "接收到的 titles\(String(describing: titles))")
                 BFLog(message: "接收到的 titles\(String(describing: titles))")

+ 9 - 1
BFFramework/Classes/Stuckpoint/View/PQEditPublicTitleView.swift

@@ -159,7 +159,7 @@ class PQEditPublicTitleView: UIView {
             make.top.equalTo(inputBgView.snp_bottom).offset(10)
             make.top.equalTo(inputBgView.snp_bottom).offset(10)
         }
         }
  
  
-        titleCollectionView.reloadData()
+//        titleCollectionView.reloadData()
     }
     }
 
 
     required init?(coder _: NSCoder) {
     required init?(coder _: NSCoder) {
@@ -263,6 +263,14 @@ class PQEditPublicTitleViewContentCell: UICollectionViewCell {
     var titleStr: String? {
     var titleStr: String? {
         didSet {
         didSet {
             titleLab.text = titleStr
             titleLab.text = titleStr
+            
+            if(titleLab.text?.count ?? 0 == 0){
+                lineView.backgroundColor = .white
+                iconView.isHidden = true
+            }else{
+                lineView.backgroundColor = UIColor.hexColor(hexadecimal: "#EFEFEF")
+                iconView.isHidden = false
+            }
             addLayout()
             addLayout()
         }
         }
     }
     }