Skip to content

Commit

Permalink
Fix contentViewController bottom safe area
Browse files Browse the repository at this point in the history
  • Loading branch information
dogo committed Sep 27, 2021
1 parent 2f2760e commit 2e022b6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/AKSideMenu/AKSideMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 2e022b6

Please sign in to comment.