Procházet zdrojové kódy

Fix scrollView insets after the footer was removed

Fix scrollView insets after the footer was removed
MJLee před 10 roky
rodič
revize
fbc5f671d5

+ 1 - 1
MJRefresh.podspec

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

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

@@ -2,7 +2,7 @@
 //  代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
 //  代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
 #import <UIKit/UIKit.h>
 #import <UIKit/UIKit.h>
 
 
-const CGFloat MJRefreshHeaderHeight = 64.0;
+const CGFloat MJRefreshHeaderHeight = 54.0;
 const CGFloat MJRefreshFooterHeight = 44.0;
 const CGFloat MJRefreshFooterHeight = 44.0;
 const CGFloat MJRefreshFastAnimationDuration = 0.25;
 const CGFloat MJRefreshFastAnimationDuration = 0.25;
 const CGFloat MJRefreshSlowAnimationDuration = 0.4;
 const CGFloat MJRefreshSlowAnimationDuration = 0.4;

+ 2 - 0
MJRefreshExample/MJRefreshExample/MJRefresh/MJRefreshFooter.m

@@ -105,6 +105,8 @@ - (void)willMoveToSuperview:(UIView *)newSuperview
         
         
         // 重新调整frame
         // 重新调整frame
         [self adjustFrameWithContentSize];
         [self adjustFrameWithContentSize];
+    } else { // 被移除了
+        _scrollView.mj_insetB -= self.mj_h;
     }
     }
 }
 }