This commit is contained in:
jonkykong
2019-07-21 21:43:07 -07:00
parent aea7592d85
commit f1e4efeb46
@@ -166,12 +166,12 @@ open class UISideMenuNavigationController: UINavigationController {
// When presenting a view controller from the menu, the menu view gets moved into another transition view above our transition container
// which can break the visual layout we had before. So, we move the menu view back to its original transition view to preserve it.
if let presentingView = presentingViewController?.view, let containerView = presentingView.superview {
containerView.addSubview(view)
}
if dismissOnPresent && !isBeingDismissed {
// We're presenting a view controller from the menu, so we need to hide the menu so it isn't showing when the presented view is dismissed.
if let presentingView = presentingViewController?.view, let containerView = presentingView.superview {
containerView.addSubview(view)
}
transitionController?.transition(presenting: false, animated: animated, alongsideTransition: { [weak self] in
guard let self = self else { return }
self.activeDelegate?.sideMenuWillDisappear?(menu: self, animated: animated)
@@ -206,11 +206,11 @@ open class UISideMenuNavigationController: UINavigationController {
activeDelegate?.sideMenuDidDisappear?(menu: self, animated: animated)
if dismissOnPresent && !isBeingDismissed {
view.isHidden = true
} else {
if isBeingDismissed {
transitionController = nil
interactive = false
} else if dismissOnPresent {
view.isHidden = true
}
}