Pārlūkot izejas kodu

Fix mj_Y -> mj_contentSizeH

Fix mj_Y -> mj_contentSizeH
MJLee 10 gadi atpakaļ
vecāks
revīzija
783024fae7

+ 2 - 2
MJRefresh.podspec

@@ -1,12 +1,12 @@
 Pod::Spec.new do |s|
   s.name         = "MJRefresh"
-  s.version      = "1.0.4"
+  s.version      = "1.0.5"
   s.summary      = "The easiest way to use pull-to-refresh"
   s.homepage     = "https://github.com/CoderMJLee/MJRefresh"
   s.license      = "MIT"
   s.authors      = { 'MJ Lee' => '199109106@qq.com'}
   s.platform     = :ios, "6.0"
-  s.source       = { :git => "https://github.com/CoderMJLee/MJRefresh.git", :tag => "1.0.4" }
+  s.source       = { :git => "https://github.com/CoderMJLee/MJRefresh.git", :tag => "1.0.5" }
   s.source_files = "MJRefreshExample/MJRefreshExample/MJRefresh/*.{h,m}"
   s.resource     = "MJRefreshExample/MJRefreshExample/MJRefresh/MJRefresh.bundle"
   s.requires_arc = true

+ 1 - 1
MJRefreshExample/MJRefreshExample/Classes/MJCollectionViewController.m

@@ -35,7 +35,7 @@ - (void)example21
     [self.collectionView addLegendHeader];
     self.collectionView.header.refreshingBlock = ^{
         // 增加5条假数据
-        for (int i = 0; i<5; i++) {
+        for (int i = 0; i<10; i++) {
             [weakSelf.colors insertObject:MJRandomColor atIndex:0];
         }
         

+ 1 - 1
MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshFooter.m

@@ -131,7 +131,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
                     [self beginRefreshing];
                 }
             } else { // 超出一个屏幕
-                if (_scrollView.mj_offsetY > self.mj_y + _scrollView.mj_insetB - _scrollView.mj_h) {
+                if (_scrollView.mj_offsetY > _scrollView.mj_contentSizeH + _scrollView.mj_insetB - _scrollView.mj_h) {
                     [self beginRefreshing];
                 }
             }