Skip to content

Commit

Permalink
Merge pull request #84 from macbaginski/fix/bottom-safe-area
Browse files Browse the repository at this point in the history
Fix contentViewContainer additionalSafeAreaInset
  • Loading branch information
dogo authored Nov 30, 2021
2 parents 2e022b6 + b933ac8 commit 0a6818f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/AKSideMenu/AKSideMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,11 @@ open class AKSideMenu: UIViewController, UIGestureRecognizerDelegate {
} else if insets.top < .zero {
insets.top = .zero
}
let bottomSafeArea = self.view.safeAreaLayoutGuide.layoutFrame.maxY
if insets.bottom < bottomSafeArea {
insets.bottom = self.view.frame.maxY - self.contentViewContainer.frame.maxY
let bottomSafeArea = self.view.frame.maxY - self.view.safeAreaLayoutGuide.layoutFrame.maxY
if insets.bottom > bottomSafeArea {
insets.bottom = bottomSafeArea
} else if insets.bottom <= bottomSafeArea {
} else if insets.bottom < .zero {
insets.bottom = .zero
}
self.contentViewController?.additionalSafeAreaInsets = insets
Expand Down

0 comments on commit 0a6818f

Please sign in to comment.