Skip to content

Commit 2c51095

Browse files
zoff99Tha14
authored andcommitted
fix tabview at bottom overlapping virtual home button.
1 parent 3dc939f commit 2c51095

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Antidote/TabBarController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ extension TabBarController {
121121
customTabBarViewHiddenConstraint = $0.top.equalTo(view.snp.bottom).constraint
122122
$0.leading.trailing.equalTo(view)
123123
$0.height.equalTo(tabBar.frame.size.height)
124+
// TODO: this moves the view a bit more to the top, because the home button "line" is in the way otherwise
125+
// please fix me properly in the future
126+
if #available(iOS 11.0, *) {
127+
let keyWindow = UIApplication.shared.keyWindow
128+
let b = keyWindow?.safeAreaInsets.bottom
129+
customTabBarViewVisibleConstraint?.update(offset: -(b ?? 20))
130+
}
131+
124132
}
125133

126134
customTabBarViewHiddenConstraint.deactivate()

0 commit comments

Comments
 (0)