瀏覽代碼

增加音乐列表加载更多逻辑

harry 3 年之前
父節點
當前提交
c84a7a5767
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicContentController.swift

+ 10 - 0
BFFramework/Classes/Stuckpoint/Controller/PQStuckPointMusicContentController.swift

@@ -67,6 +67,16 @@ class PQStuckPointMusicContentController: PQBaseViewController {
         }
         // 延迟scrollView上子视图的响应,所以当直接拖动UISlider时,如果此时touch时间在150ms以内,UIScrollView会认为是拖动自己,从而拦截了event,导致UISlider接收不到滑动的event
         collectionView.delaysContentTouches = false
+        collectionView.addRefreshView (type:.REFRESH_TYPE_FOOTER) {[weak self] isRefresh in
+            if !isRefresh {
+                // 请求一下加载更多
+                if self?.refreshHandle != nil {
+                    self?.refreshHandle!(isRefresh, self?.contentType ?? .catagery)
+                }
+            }else{
+                collectionView.mj_header?.endRefreshing()
+            }
+        }
         return collectionView
     }()