Skip to content

Commit

Permalink
fix: Fix pan to dismiss and can drag back again.
Browse files Browse the repository at this point in the history
  • Loading branch information
HeathWang committed Nov 6, 2019
1 parent 7a4ff54 commit 9432d30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HWPanModal.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'HWPanModal'
s.version = '0.6.3'
s.version = '0.6.4'
s.summary = 'HWPanModal is used to present controller and drag to dismiss.'

# This description is used to generate tags and improve search results.
Expand Down
1 change: 1 addition & 0 deletions Sources/Animator/HWPanModalPresentationAnimator.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ - (void)animateDismissal:(id<UIViewControllerContextTransitioning>)context {
[fromVC.view removeFromSuperview];
[self endAppearanceTransitionForController:fromVC];
[toVC endAppearanceTransition];
context.containerView.userInteractionEnabled = YES;
}
[context completeTransition:finished];
}];
Expand Down
2 changes: 2 additions & 0 deletions Sources/Controller/HWPanModalPresentationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ - (void)presentableTransitionToState:(PresentationState)state {

- (void)finishInteractiveTransition {
if (self.presentedViewController.isBeingDismissed) {
// make the containerView can not response event action.
self.containerView.userInteractionEnabled = NO;
[[self interactiveAnimator] finishInteractiveTransition];

if (self.presentedViewController.hw_panModalPresentationDelegate.interactiveMode != PanModalInteractiveModeDragDown)
Expand Down

0 comments on commit 9432d30

Please sign in to comment.