From 49b0f58985a7a23ac9737e6623f796ab56c8063e Mon Sep 17 00:00:00 2001 From: Gdxy Date: Mon, 16 Mar 2020 10:16:24 +0800 Subject: [PATCH] =?UTF-8?q?issues16=E6=89=8B=E5=8A=BF=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8Dhttps://github.com/LoongerT?= =?UTF-8?q?ao/TLTransitions/issues/16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TLPercentDrivenInteractiveTransition.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TLTransitions/TransitionController/TLPercentDrivenInteractiveTransition.m b/TLTransitions/TransitionController/TLPercentDrivenInteractiveTransition.m index 4694c77..9d8e9e8 100644 --- a/TLTransitions/TransitionController/TLPercentDrivenInteractiveTransition.m +++ b/TLTransitions/TransitionController/TLPercentDrivenInteractiveTransition.m @@ -67,7 +67,9 @@ - (CGFloat)percentForGesture:(UIPanGestureRecognizer *)gesture CGFloat percent = 0.f; - if ([gesture isMemberOfClass: [UIScreenEdgePanGestureRecognizer class]]) { + if ([gesture isMemberOfClass: [UIScreenEdgePanGestureRecognizer class]] || + [gesture isMemberOfClass: NSClassFromString(@"TLScreenEdgePanGestureRecognizer")]) + { if (self.edge == UIRectEdgeRight) { percent = (width - locationInSourceView.x) / width; @@ -76,7 +78,7 @@ - (CGFloat)percentForGesture:(UIPanGestureRecognizer *)gesture percent = locationInSourceView.x / width; } - }else { + }else { // 用户自定义收拾 if (self.edge == UIRectEdgeRight) { percent = (width - locationInSourceView.x) / width;