Quellcode durchsuchen

animation for collectionView footer noticeNoMoreData

animation for collectionView footer noticeNoMoreData
MJLee vor 10 Jahren
Ursprung
Commit
2b9b9232cd
2 geänderte Dateien mit 12 neuen und 1 gelöschten Zeilen
  1. 1 1
      MJRefresh.podspec
  2. 11 0
      MJRefresh/Base/MJRefreshBackFooter.m

+ 1 - 1
MJRefresh.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
     s.name         = 'MJRefresh'
-    s.version      = '2.4.10'
+    s.version      = '2.4.11'
     s.summary      = 'The easiest way to use pull-to-refresh'
     s.homepage     = 'https://github.com/CoderMJLee/MJRefresh'
     s.license      = 'MIT'

+ 11 - 0
MJRefresh/Base/MJRefreshBackFooter.m

@@ -134,6 +134,17 @@ - (void)endRefreshing
     }
 }
 
+- (void)noticeNoMoreData
+{
+    if ([self.scrollView isKindOfClass:[UICollectionView class]]) {
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [super noticeNoMoreData];
+        });
+    } else {
+        [super noticeNoMoreData];
+    }
+}
+
 #pragma mark - 私有方法
 #pragma mark 获得scrollView的内容 超出 view 的高度
 - (CGFloat)heightForContentBreakView