You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2017/04/21 06:18:30 UTC
[07/50] incubator-weex git commit: --
--
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8c2b6a29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8c2b6a29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8c2b6a29
Branch: refs/heads/0.13-dev
Commit: 8c2b6a2956475ab50fd3b64dcde9c3d105ee788f
Parents: 5529bb1
Author: xuyouhong <16...@qq.com>
Authored: Mon Apr 17 15:29:59 2017 +0800
Committer: xuyouhong <16...@qq.com>
Committed: Mon Apr 17 15:29:59 2017 +0800
----------------------------------------------------------------------
.../Sources/Controller/WXBaseViewController.h | 2 +-
.../Sources/Controller/WXBaseViewController.m | 16 ----------------
.../Sources/Controller/WXRootViewController.m | 17 ++++++++++++++++-
3 files changed, 17 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8c2b6a29/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.h b/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.h
index daf96e3..f834803 100644
--- a/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.h
+++ b/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.h
@@ -15,7 +15,7 @@
* special bundle URL.
*/
-@interface WXBaseViewController : UIViewController <UIGestureRecognizerDelegate>
+@interface WXBaseViewController : UIViewController
/**
* @abstract initializes the viewcontroller with bundle url.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8c2b6a29/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.m b/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.m
index 1523675..9051ed7 100644
--- a/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.m
+++ b/ios/sdk/WeexSDK/Sources/Controller/WXBaseViewController.m
@@ -66,7 +66,6 @@
- (void)viewDidLoad
{
[super viewDidLoad];
- [self addEdgePop];
self.view.backgroundColor = [UIColor whiteColor];
self.automaticallyAdjustsScrollViewInsets = NO;
[self _renderWithURL:_sourceURL];
@@ -106,21 +105,6 @@
[self _renderWithURL:_sourceURL];
}
-- (void)addEdgePop
-{
- self.navigationController.interactivePopGestureRecognizer.delegate = self;
-}
-
-#pragma mark- UIGestureRecognizerDelegate
-
-- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
-{
- if (!self.navigationController || [self.navigationController.viewControllers count] == 1) {
- return NO;
- }
- return YES;
-}
-
- (void)_renderWithURL:(NSURL *)sourceURL
{
if (!sourceURL) {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8c2b6a29/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m b/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
index befb010..e25cc07 100644
--- a/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
+++ b/ios/sdk/WeexSDK/Sources/Controller/WXRootViewController.m
@@ -12,7 +12,7 @@
typedef void(^OperationBlock)(void);
-@interface WXRootViewController()
+@interface WXRootViewController() <UIGestureRecognizerDelegate>
@property(nonatomic, strong) WXThreadSafeMutableArray *operationArray;
@property (nonatomic, assign) BOOL operationInProcess;
@@ -21,6 +21,11 @@ typedef void(^OperationBlock)(void);
@implementation WXRootViewController
+- (void)viewDidLoad
+{
+ self.interactivePopGestureRecognizer.delegate = self;
+}
+
- (id)initWithSourceURL:(NSURL *)sourceURL
{
WXBaseViewController *baseViewController = [[WXBaseViewController alloc]initWithSourceURL:sourceURL];
@@ -103,6 +108,16 @@ typedef void(^OperationBlock)(void);
}
}
+#pragma mark- UIGestureRecognizerDelegate
+
+- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
+{
+ if ([self.viewControllers count] == 1) {
+ return NO;
+ }
+ return YES;
+}
+
- (NSMutableArray *)pendingBlocks
{