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/09 11:53:17 UTC

[1/2] incubator-weex git commit: * [ios] add more comments about category

Repository: incubator-weex
Updated Branches:
  refs/heads/release-0.16 5e85cea99 -> 31eb130dc


* [ios] add more comments about category


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

Branch: refs/heads/release-0.16
Commit: 31eb130dc36d78a5f515be481b502c971b9fbeb8
Parents: 3589859
Author: acton393 <zh...@gmail.com>
Authored: Mon Oct 9 19:46:20 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Mon Oct 9 19:53:06 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31eb130d/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 bf8021f..a7d042e 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -33,7 +33,6 @@
 @implementation WXScrollerComponnetView
 @end;
 
-// add a category compatible for new API
 @interface WXScrollerComponnetView(WXScrollerComponnetView_ContentInsetAdjustmentBehavior)
 @property(nonatomic, assign)NSUInteger contentInsetAdjustmentBehavior;
 @end
@@ -166,7 +165,10 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
     scrollView.alwaysBounceHorizontal = _alwaysScrollableHorizontal;
     scrollView.alwaysBounceVertical = _alwaysScrollableVertical;
     if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"11.0")) {
-        // now use the runtime to forbid the contentInset being Adjusted
+        // now use the runtime to forbid the contentInset being Adjusted.
+        // here we add a category for scoller component view class compatible for new API,
+        // as we are concerning about weexSDK build as framework by Xcode8, using in Xcode9 project,
+        // so the the macro __IPHONE_11_0 will be useless in this case.
         scrollView.contentInsetAdjustmentBehavior = 2;
     }
     


[2/2] incubator-weex git commit: * [ios] add WXScrollerComponentView and compatible iOS 11 new API

Posted by gu...@apache.org.
* [ios] add WXScrollerComponentView and compatible iOS 11 new API


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

Branch: refs/heads/release-0.16
Commit: 358985901ac778900b6eefbcf716e10244c0df22
Parents: 5e85cea
Author: acton393 <zh...@gmail.com>
Authored: Mon Oct 9 18:22:56 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Mon Oct 9 19:53:06 2017 +0800

----------------------------------------------------------------------
 .../WeexSDK/Sources/Component/WXScrollerComponent.m   | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/35898590/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 88c934c..bf8021f 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -26,7 +26,15 @@
 #import "WXUtility.h"
 #import "WXLoadingComponent.h"
 #import "WXRefreshComponent.h"
-@interface UIScrollView(WeexUIScrollerView_ContentInsetAdjustmentBehavior)
+
+@interface WXScrollerComponnetView:UIScrollView
+@end
+
+@implementation WXScrollerComponnetView
+@end;
+
+// add a category compatible for new API
+@interface WXScrollerComponnetView(WXScrollerComponnetView_ContentInsetAdjustmentBehavior)
 @property(nonatomic, assign)NSUInteger contentInsetAdjustmentBehavior;
 @end
 
@@ -139,14 +147,14 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
 
 - (UIView *)loadView
 {
-    return [[UIScrollView alloc] init];
+    return [[WXScrollerComponnetView alloc] init];
 }
 
 - (void)viewDidLoad
 {
     [super viewDidLoad];
     [self setContentSize:_contentSize];
-    UIScrollView* scrollView = (UIScrollView *)self.view;
+    WXScrollerComponnetView* scrollView = (WXScrollerComponnetView *)self.view;
     scrollView.delegate = self;
     scrollView.exclusiveTouch = YES;
     scrollView.autoresizesSubviews = NO;