You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there was behavior bug when contentviewcontroller fixed to bottom safearealayoutguide.
I have added following code to my project at AKSideMenu updateContentViewAdditionalSafeAreaInsets()
after setting insets.top.
let window = UIApplication.shared.keyWindow
let bottomPadding = window?.safeAreaInsets.bottom
if insets.bottom < bottomPadding! {
insets.bottom = bottomPadding!
}else if insets.bottom <= bottomPadding! {
insets.bottom = 0.0
}
here is full version
func updateContentViewAdditionalSafeAreaInsets() {
if #available(iOS 11.0, *) {
if var insets = self.contentViewController?.additionalSafeAreaInsets {
insets.top = self.contentViewContainer.frame.minY
let topSafeArea = self.view.safeAreaLayoutGuide.layoutFrame.minY
if insets.top > topSafeArea {
insets.top = topSafeArea
} else if insets.top < 0.0 {
insets.top = 0.0
}
let window = UIApplication.shared.keyWindow
let bottomPadding = window?.safeAreaInsets.bottom
if insets.bottom < bottomPadding! {
insets.bottom = bottomPadding!
}else if insets.bottom <= bottomPadding! {
insets.bottom = 0.0
}
there was behavior bug when contentviewcontroller fixed to bottom safearealayoutguide.
I have added following code to my project at AKSideMenu updateContentViewAdditionalSafeAreaInsets()
after setting insets.top.
let window = UIApplication.shared.keyWindow
let bottomPadding = window?.safeAreaInsets.bottom
if insets.bottom < bottomPadding! {
insets.bottom = bottomPadding!
}else if insets.bottom <= bottomPadding! {
insets.bottom = 0.0
}
here is full version
func updateContentViewAdditionalSafeAreaInsets() {
if #available(iOS 11.0, *) {
if var insets = self.contentViewController?.additionalSafeAreaInsets {
insets.top = self.contentViewContainer.frame.minY
let topSafeArea = self.view.safeAreaLayoutGuide.layoutFrame.minY
if insets.top > topSafeArea {
insets.top = topSafeArea
} else if insets.top < 0.0 {
insets.top = 0.0
}
let window = UIApplication.shared.keyWindow
let bottomPadding = window?.safeAreaInsets.bottom
if insets.bottom < bottomPadding! {
insets.bottom = bottomPadding!
}else if insets.bottom <= bottomPadding! {
insets.bottom = 0.0
}
The text was updated successfully, but these errors were encountered: