Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #570 Keyboard Hides when sidemenu appears but after closing side menu … #654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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