From 2e022b627109363ec4a2645eff2b24f7994aa160 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 26 Sep 2021 23:55:59 -0300 Subject: [PATCH] Fix contentViewController bottom safe area --- Sources/AKSideMenu/AKSideMenu.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sources/AKSideMenu/AKSideMenu.swift b/Sources/AKSideMenu/AKSideMenu.swift index fe1d345..3d94e9d 100644 --- a/Sources/AKSideMenu/AKSideMenu.swift +++ b/Sources/AKSideMenu/AKSideMenu.swift @@ -511,8 +511,14 @@ open class AKSideMenu: UIViewController, UIGestureRecognizerDelegate { let topSafeArea = self.view.safeAreaLayoutGuide.layoutFrame.minY if insets.top > topSafeArea { insets.top = topSafeArea - } else if insets.top < 0.0 { - insets.top = 0.0 + } else if insets.top < .zero { + insets.top = .zero + } + let bottomSafeArea = self.view.safeAreaLayoutGuide.layoutFrame.maxY + if insets.bottom < bottomSafeArea { + insets.bottom = bottomSafeArea + } else if insets.bottom <= bottomSafeArea { + insets.bottom = .zero } self.contentViewController?.additionalSafeAreaInsets = insets }