You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/10/11 05:11:29 UTC
[1/3] incubator-weex git commit: * [ios] bugfix list view can not
scroll
Repository: incubator-weex
Updated Branches:
refs/heads/release-0.16 3cf15bc0d -> ccf0590b3
* [ios] bugfix list view can not scroll
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9833852c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9833852c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9833852c
Branch: refs/heads/release-0.16
Commit: 9833852c0758b37f85a33db7592464d21f8cddce
Parents: 3cf15bc
Author: acton393 <zh...@gmail.com>
Authored: Wed Oct 11 11:39:53 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Oct 11 11:42:27 2017 +0800
----------------------------------------------------------------------
.../Sources/Component/WXScrollerComponent.m | 31 ++++++++++++--------
1 file changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9833852c/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
index a7d042e..b7a522a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -69,8 +69,8 @@
CGPoint _lastContentOffset;
CGPoint _lastScrollEventFiredOffset;
BOOL _scrollable;
- BOOL _alwaysScrollableVertical;
- BOOL _alwaysScrollableHorizontal;
+ NSString * _alwaysScrollableVertical;
+ NSString * _alwaysScrollableHorizontal;
// vertical & horizontal
WXScrollDirection _scrollDirection;
@@ -119,10 +119,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
_lastScrollEventFiredOffset = CGPointMake(0, 0);
_scrollDirection = attributes[@"scrollDirection"] ? [WXConvert WXScrollDirection:attributes[@"scrollDirection"]] : WXScrollDirectionVertical;
_showScrollBar = attributes[@"showScrollbar"] ? [WXConvert BOOL:attributes[@"showScrollbar"]] : YES;
- // default value is NO;
- _alwaysScrollableVertical = attributes[@"alwaysScrollableVertical"]?[WXConvert BOOL:attributes[@"alwaysScrollableVertical"]] : NO;
- // default value is NO;
- _alwaysScrollableHorizontal = attributes[@"alwaysScrollableHorizontal"]?[WXConvert BOOL:attributes[@"alwaysScrollableHorizontal"]] : NO;
+
+ if (attributes[@"alwaysScrollableVertical"]) {
+ _alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
+ }
+ if (attributes[@"alwaysScrollableHorizontal"]) {
+ _alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
+ }
_pagingEnabled = attributes[@"pagingEnabled"] ? [WXConvert BOOL:attributes[@"pagingEnabled"]] : NO;
_loadMoreOffset = attributes[@"loadmoreoffset"] ? [WXConvert WXPixelType:attributes[@"loadmoreoffset"] scaleFactor:self.weexInstance.pixelScaleFactor] : 0;
_loadmoreretry = attributes[@"loadmoreretry"] ? [WXConvert NSUInteger:attributes[@"loadmoreretry"]] : 0;
@@ -162,8 +165,12 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
scrollView.showsHorizontalScrollIndicator = _showScrollBar;
scrollView.scrollEnabled = _scrollable;
scrollView.pagingEnabled = _pagingEnabled;
- scrollView.alwaysBounceHorizontal = _alwaysScrollableHorizontal;
- scrollView.alwaysBounceVertical = _alwaysScrollableVertical;
+ if (_alwaysScrollableHorizontal) {
+ scrollView.alwaysBounceHorizontal = [WXConvert BOOL:_alwaysScrollableHorizontal];
+ }
+ if (_alwaysScrollableVertical) {
+ scrollView.alwaysBounceVertical = [WXConvert BOOL:_alwaysScrollableVertical];
+ }
if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"11.0")) {
// now use the runtime to forbid the contentInset being Adjusted.
// here we add a category for scoller component view class compatible for new API,
@@ -232,13 +239,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
((UIScrollView *)self.view).scrollEnabled = _scrollable;
}
if (attributes[@"alwaysScrollableHorizontal"]) {
- _alwaysScrollableHorizontal = [WXConvert BOOL:attributes[@"alwaysScrollableHorizontal"]];
- ((UIScrollView*)self.view).alwaysBounceHorizontal = _alwaysScrollableHorizontal;
+ _alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
+ ((UIScrollView*)self.view).alwaysBounceHorizontal = [WXConvert BOOL:_alwaysScrollableHorizontal];
}
if (attributes[@"alwaysScrollableVertical"]) {
- _alwaysScrollableVertical = [WXConvert BOOL:attributes[@"alwaysScrollableVertical"]];
- ((UIScrollView*)self.view).alwaysBounceVertical = _alwaysScrollableVertical;
+ _alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
+ ((UIScrollView*)self.view).alwaysBounceVertical = [WXConvert BOOL:_alwaysScrollableVertical];
}
if (attributes[@"offsetAccuracy"]) {
_offsetAccuracy = [WXConvert WXPixelType:attributes[@"offsetAccuracy"] scaleFactor:self.weexInstance.pixelScaleFactor];
[3/3] incubator-weex git commit: Revert "* [ios] set default value to
nil when the configuration is empty"
Posted by gu...@apache.org.
Revert "* [ios] set default value to nil when the configuration is empty"
This reverts commit 4376205615fdcbd4fd9f118a02961e074eb057bf.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ccf0590b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ccf0590b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ccf0590b
Branch: refs/heads/release-0.16
Commit: ccf0590b344c4adce40030315b7be1d22dd99ac9
Parents: 4376205
Author: acton393 <zh...@gmail.com>
Authored: Wed Oct 11 12:25:29 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Oct 11 12:25:29 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m | 4 ----
1 file changed, 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ccf0590b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
index fafc41d..b7a522a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -122,13 +122,9 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
if (attributes[@"alwaysScrollableVertical"]) {
_alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
- }else {
- _alwaysScrollableVertical = nil;
}
if (attributes[@"alwaysScrollableHorizontal"]) {
_alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
- } else {
- _alwaysScrollableHorizontal = nil;
}
_pagingEnabled = attributes[@"pagingEnabled"] ? [WXConvert BOOL:attributes[@"pagingEnabled"]] : NO;
_loadMoreOffset = attributes[@"loadmoreoffset"] ? [WXConvert WXPixelType:attributes[@"loadmoreoffset"] scaleFactor:self.weexInstance.pixelScaleFactor] : 0;
[2/3] incubator-weex git commit: * [ios] set default value to nil
when the configuration is empty
Posted by gu...@apache.org.
* [ios] set default value to nil when the configuration is empty
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/43762056
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/43762056
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/43762056
Branch: refs/heads/release-0.16
Commit: 4376205615fdcbd4fd9f118a02961e074eb057bf
Parents: 9833852
Author: acton393 <zh...@gmail.com>
Authored: Wed Oct 11 11:45:45 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Wed Oct 11 11:45:45 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43762056/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
index b7a522a..fafc41d 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -122,9 +122,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
if (attributes[@"alwaysScrollableVertical"]) {
_alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
+ }else {
+ _alwaysScrollableVertical = nil;
}
if (attributes[@"alwaysScrollableHorizontal"]) {
_alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
+ } else {
+ _alwaysScrollableHorizontal = nil;
}
_pagingEnabled = attributes[@"pagingEnabled"] ? [WXConvert BOOL:attributes[@"pagingEnabled"]] : NO;
_loadMoreOffset = attributes[@"loadmoreoffset"] ? [WXConvert WXPixelType:attributes[@"loadmoreoffset"] scaleFactor:self.weexInstance.pixelScaleFactor] : 0;