Skip to content

Commit

Permalink
Merge pull request #85 from dogo/fix/bottom-safe-area
Browse files Browse the repository at this point in the history
Fix/bottom safe area
  • Loading branch information
dogo authored Nov 30, 2021
2 parents 4b5a048 + 0a6818f commit 0f726d5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Sources/AKSideMenu/AKSideMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,15 @@ 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
}
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 < .zero {
insets.bottom = .zero
}
self.contentViewController?.additionalSafeAreaInsets = insets
}
Expand Down

0 comments on commit 0f726d5

Please sign in to comment.