Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Pod/Classes/SideMenuNavigationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,13 @@ internal extension SideMenuNavigationController {
transitionController?.interactive = interactively
dismiss(animated: flag, completion: completion)
}

func dismissMenuWithTap() {
guard !isHidden else { return }
transitionController?.interactive = true
dismiss(animated: true, completion: nil)
transitionController?.handle(state: .finish)
}

// Note: although this method is syntactically reversed it allows the interactive property to scoped privately
func present(from viewController: UIViewController?, interactively: Bool, completion: (() -> Void)? = nil) {
Expand Down Expand Up @@ -635,7 +642,7 @@ private extension SideMenuNavigationController {
@objc func handleDismissMenuTap(_ tap: UITapGestureRecognizer) {
let hitTest = view.window?.hitTest(tap.location(in: view.superview), with: nil)
guard hitTest == view.superview else { return }
dismissMenu()
dismissMenuWithTap()
}

@objc func handleDismissMenuPan(_ gesture: UIPanGestureRecognizer) {
Expand Down