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

incubator-weex git commit: * [ios] bug fix slider can not scroll to special area.

Repository: incubator-weex
Updated Branches:
  refs/heads/0.11-dev c6c6399ba -> 9cd4dae2b


* [ios] bug fix slider can not scroll to special area.


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

Branch: refs/heads/0.11-dev
Commit: 9cd4dae2bab0436fb7a57c854bc8a2cce2352c57
Parents: c6c6399
Author: boboning <ni...@163.com>
Authored: Sat Mar 18 10:41:11 2017 +0800
Committer: boboning <ni...@163.com>
Committed: Sat Mar 18 10:41:11 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9cd4dae2/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
index 1df3aa2..c09654b 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
@@ -238,7 +238,8 @@
 {
     if (self.itemViews.count > 2) {
         UIView *itemView = [self.itemViews objectAtIndex:[self _centerItemIndex]];
-        [self.scrollView scrollRectToVisible:itemView.frame animated:NO];
+        //[self.scrollView scrollRectToVisible:itemView.frame animated:NO];
+        [self.scrollView setContentOffset:CGPointMake(itemView.frame.origin.x, itemView.frame.origin.y) animated:NO];
     }
 }