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/08/09 06:50:27 UTC

[5/6] incubator-weex git commit: * [ios]WXRecylerDragController remove Notes

* [ios]WXRecylerDragController remove Notes


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

Branch: refs/heads/0.16-dev
Commit: c151986854454e3b48aa599e9df0d7bf500b61f8
Parents: c6e1dbe
Author: ximu <xi...@alibaba-inc.com>
Authored: Wed Aug 2 10:46:08 2017 +0800
Committer: ximu <xi...@alibaba-inc.com>
Committed: Wed Aug 2 10:46:08 2017 +0800

----------------------------------------------------------------------
 .../Recycler/WXRecyclerDragController.h         | 25 ++++++++++++-----
 .../Recycler/WXRecyclerDragController.m         | 28 +++++++++++++-------
 2 files changed, 36 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c1519868/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.h b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.h
index a5f70b7..d561de9 100644
--- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.h
+++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.h
@@ -1,10 +1,21 @@
-//
-//  WXRecyclerDragController.h
-//  Pods
-//
-//  Created by ximu on 2017/7/31.
-//
-//
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 #import <Foundation/Foundation.h>
 #import "WXSectionDataController.h"

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c1519868/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.m
index b3939c0..5538cf9 100644
--- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.m
+++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerDragController.m
@@ -1,10 +1,21 @@
-//
-//  WXRecyclerDragController.m
-//  Pods
-//
-//  Created by ximu on 2017/7/31.
-//
-//
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 #import "WXRecyclerDragController.h"
 
@@ -43,7 +54,6 @@
         [_excludedAry addObjectsFromArray:[set allObjects]];
     }
     
-    //遍历获取锚点
     NSMutableArray *subviewComponents = [[NSMutableArray alloc] init];
     [subviewComponents addObjectsFromArray:wxComponent.subcomponents];
     WXComponent *anchorComponent;
@@ -61,13 +71,11 @@
     }
     
     if (anchorComponent) {
-        //去除全局UILongPressGestureRecognizer手势
         if (_currentLongPress) {
             [self.collectionView removeGestureRecognizer:_currentLongPress];
             _currentLongPress = nil;
         }
         
-        //添加锚点的手势
         if (_dragTriggerType == WXRecyclerDragTriggerPan) {
             UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(longPressMethod:)];
             [anchorComponent.view addGestureRecognizer:panGestureRecognizer];