You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/03/22 02:00:12 UTC

[39/50] incubator-weex git commit: * [ios] fix refresh fold more than refresh view height

* [ios] fix refresh fold more than refresh view height


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/c885bbf5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/c885bbf5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/c885bbf5

Branch: refs/heads/0.12-dev
Commit: c885bbf536a568531f338306a06f7d76a670cd79
Parents: bbcc2db
Author: acton393 <zh...@gmail.com>
Authored: Mon Mar 20 17:10:58 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Mar 20 17:10:58 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.m | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c885bbf5/ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.m
index f519a4f..d71df2d 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXRefreshComponent.m
@@ -142,7 +142,9 @@
         offset.y = -self.calculatedFrame.size.height;
         [_indicator start];
     } else {
-        offset.y += CGRectGetHeight(self.calculatedFrame);
+        if (fabs(offset.y) >= CGRectGetHeight(self.calculatedFrame)) {
+            offset.y += CGRectGetHeight(self.calculatedFrame);
+        }
         [_indicator stop];
     }
     [scrollerProtocol setContentOffset:offset animated:YES];
@@ -154,10 +156,4 @@
     return _displayState;
 }
 
-- (void)setFrame:(CGRect)frame
-{
-    CGRect rect = frame;
-    rect.origin.y = 0 - frame.size.height;
-}
-
 @end