Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working properly with Tabbar #19

Open
bhavneet0812 opened this issue Feb 26, 2019 · 2 comments
Open

Not working properly with Tabbar #19

bhavneet0812 opened this issue Feb 26, 2019 · 2 comments

Comments

@bhavneet0812
Copy link

simulator screen shot - iphone xs max - 2019-02-26 at 12 27 48
simulator screen shot - iphone xs max - 2019-02-26 at 12 27 45

@binho
Copy link

binho commented Feb 28, 2019

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
}

@s4cha
Copy link
Member

s4cha commented Jul 7, 2019

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants