Open bhavneet0812 opened 5 years ago
Hey 👋 Not sure if you still with this issue but I was able to solve that by adding the tab bar height when decreasing the keyboard height:
@objc
private func keyboardWillChangeFrame(_ notification: Notification) {
guard var height = notification.keyboardHeight else { return }
// When tab bar is presented we need to include the tab bar height when adjusting the keyboard height
let navigationController = UIApplication.shared.keyWindow?.rootViewController as? UINavigationController
let tabBarController = navigationController?.viewControllers.first as? UITabBarController
let tabBarHeight = tabBarController?.tabBar.frame.height ?? 0
if #available(iOS 11.0, *), height > 0 {
let safeAreaBottom = owningView?.safeAreaInsets.bottom ?? 0
height -= safeAreaBottom + tabBarHeight
}
heightConstraint?.constant = height
animate(notification)
Keyboard.shared.currentHeight = height
}
@bhavneet0812 Are you still experiencing the issue? I'm trying to reproduce the issue locally with no avail, I feel like it has been solved in the meantime :)