Преглед изворни кода

Merge branch 'master' of https://git.yishihui.com/iOS/BFFramework

* 'master' of https://git.yishihui.com/iOS/BFFramework:
  发布标题隐藏键盘问题
huzhiqiang пре 3 година
родитељ
комит
0e3cdb5624

+ 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

@@ -160,7 +160,7 @@ class PQEditPublicTitleView: UIView {
 //            make.height.equalTo(542 - cAKSafeAreaHeight)
 //            make.height.equalTo(542 - cAKSafeAreaHeight)
         }
         }
  
  
-        titleCollectionView.reloadData()
+//        titleCollectionView.reloadData()
     }
     }
 
 
     required init?(coder _: NSCoder) {
     required init?(coder _: NSCoder) {
@@ -264,6 +264,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()
         }
         }
     }
     }