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/06 11:23:07 UTC
[1/2] incubator-weex git commit: * [ios] update sliderComponent ,
support to setIndex.
Repository: incubator-weex
Updated Branches:
refs/heads/0.11-dev 77c1a58ab -> 529f51720
* [ios] update sliderComponent , support to setIndex.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1d1690e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1d1690e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1d1690e7
Branch: refs/heads/0.11-dev
Commit: 1d1690e7239ba398d3a27f73c6e998eca6914c3b
Parents: 5c1ded0
Author: boboning <ni...@163.com>
Authored: Fri Mar 3 16:04:03 2017 +0800
Committer: boboning <ni...@163.com>
Committed: Fri Mar 3 16:04:03 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1d1690e7/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 20aa9b5..1df3aa2 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m
@@ -39,6 +39,7 @@
- (void)insertItemView:(UIView *)view atIndex:(NSInteger)index;
- (void)removeItemView:(UIView *)view;
- (void)scroll2ItemView:(NSInteger)index animated:(BOOL)animated;
+- (void)layoutItemViews;
- (void)loadData;
@end
@@ -157,6 +158,11 @@
}
}
+- (void)layoutItemViews {
+ [self _resortItemViews];
+ [self _resetItemFrames];
+}
+
- (void)loadData
{
self.scrollView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
@@ -168,8 +174,7 @@
#pragma mark Private Methods
- (void)_configSubViews {
- [self _resortItemViews];
- [self _resetItemFrames];
+ [self layoutItemViews];
[self _scroll2Center];
[self _resetItemCountLessThanOrEqualToTwo];
[self setNeedsLayout];
@@ -498,7 +503,8 @@
_index = [attributes[@"index"] integerValue];
self.currentIndex = _index;
- [_sliderView scroll2ItemView:self.currentIndex animated:YES];
+ self.sliderView.currentIndex = _index;
+ [self.sliderView layoutItemViews];
}
if (attributes[@"scrollable"]) {
[2/2] incubator-weex git commit: Merge branch '0.11-dev' of
https://github.com/boboning/incubator-weex into 0.11-dev
Posted by cx...@apache.org.
Merge branch '0.11-dev' of https://github.com/boboning/incubator-weex into 0.11-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/529f5172
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/529f5172
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/529f5172
Branch: refs/heads/0.11-dev
Commit: 529f51720e4d82c9a19ad0fb9cf7c85e8c633af5
Parents: 77c1a58 1d1690e
Author: cxfeng <cx...@gmail.com>
Authored: Mon Mar 6 19:22:56 2017 +0800
Committer: cxfeng <cx...@gmail.com>
Committed: Mon Mar 6 19:22:56 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXSliderComponent.m | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------