Skip to content

Not working properly with Tabbar #19

Open

Description

@bhavneet0812

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

Activity

  1. binho commented on Feb 28, 2019

    @binho

    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
    }
  2. s4cha commented on Jul 7, 2019

    @s4cha
    Member

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions