Browse Source

fix autolayout error

huzhiqiang 3 năm trước cách đây
mục cha
commit
9f5685da33

+ 8 - 4
BFFramework/Classes/Stuckpoint/View/PQSelecteMusicView.swift

@@ -125,12 +125,11 @@ class PQSelecteMusicView: UIView {
         addSubview(categoryCollection)
         addSubview(selectMusicCollection)
         addSubview(musicSearchBtn)
-
-        autolayout()
-        
-       
     }
     func showData(){
+        
+        autolayout()
+
         isHidden = false
         //不是每一次点击都显示数据
         if(musicDatas.count == 0){
@@ -176,6 +175,10 @@ class PQSelecteMusicView: UIView {
  
     }
     func autolayout() {
+        categoryCollection.snp_removeConstraints()
+        selectMusicCollection.snp_removeConstraints()
+        musicSearchBtn.snp_removeConstraints()
+
         categoryCollection.snp.makeConstraints { make in
             make.height.equalTo(20)
             make.left.equalToSuperview().offset(91)
@@ -472,6 +475,7 @@ class PQSelectMusicTagsCell: UICollectionViewCell {
     func addLayout() {
         titleLab.snp.makeConstraints { make in
             make.size.equalToSuperview()
+            make.left.top.equalToSuperview()
         }
     }
 }