Explorar o código

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

harry %!s(int64=3) %!d(string=hai) anos
pai
achega
c84a7a5767

+ 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
     }()