Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 37071b5d06 | |||
| 607260ac2e |
@@ -60,6 +60,13 @@ internal extension UIViewController {
|
||||
return activeViewController.presentingViewController?.topMostViewController ?? activeViewController
|
||||
}
|
||||
|
||||
var containerViewController: UIViewController {
|
||||
return navigationController?.containerViewController ??
|
||||
tabBarController?.containerViewController ??
|
||||
splitViewController?.containerViewController ??
|
||||
self
|
||||
}
|
||||
|
||||
@objc var isHidden: Bool {
|
||||
return presentingViewController == nil
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ internal final class SideMenuPresentationController {
|
||||
private let config: PresentationModel
|
||||
private unowned var containerView: UIView
|
||||
private var interactivePopGestureRecognizerEnabled: Bool?
|
||||
private var clipsToBounds: Bool?
|
||||
private let leftSide: Bool
|
||||
private weak var originalSuperview: UIView?
|
||||
private unowned var presentedViewController: UIViewController
|
||||
@@ -190,9 +191,7 @@ internal final class SideMenuPresentationController {
|
||||
statusBarView?.removeFromSuperview()
|
||||
presentedViewController.view.removeFromSuperview()
|
||||
|
||||
presentingViewController.view.motionEffects.removeAll()
|
||||
presentingViewController.view.layer.shadowOpacity = 0
|
||||
presentedViewController.view.layer.shadowOpacity = 0
|
||||
removeStyles(from: presentingViewController.containerViewController.view)
|
||||
|
||||
if let interactivePopGestureRecognizerEnabled = interactivePopGestureRecognizerEnabled,
|
||||
let topNavigationController = presentingViewController as? UINavigationController {
|
||||
@@ -240,6 +239,8 @@ private extension SideMenuPresentationController {
|
||||
view.layer.shadowRadius = config.presentationStyle.onTopShadowRadius
|
||||
view.layer.shadowOpacity = config.presentationStyle.onTopShadowOpacity
|
||||
view.layer.shadowOffset = config.presentationStyle.onTopShadowOffset
|
||||
clipsToBounds = clipsToBounds ?? view.clipsToBounds
|
||||
view.clipsToBounds = false
|
||||
}
|
||||
|
||||
func addParallax(to view: UIView) {
|
||||
@@ -268,4 +269,12 @@ private extension SideMenuPresentationController {
|
||||
view.addMotionEffect(group)
|
||||
}
|
||||
}
|
||||
|
||||
func removeStyles(from view: UIView) {
|
||||
view.motionEffects.removeAll()
|
||||
view.layer.shadowOpacity = 0
|
||||
view.layer.shadowOpacity = 0
|
||||
view.clipsToBounds = clipsToBounds ?? true
|
||||
clipsToBounds = false
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SideMenu"
|
||||
s.version = "6.4.0"
|
||||
s.version = "6.4.1"
|
||||
s.summary = "Simple side menu control for iOS in Swift inspired by Facebook. Right and Left sides. No coding required."
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
|
||||
Reference in New Issue
Block a user