jessesquires / JSQMessagesViewController

An elegant messages UI library for iOS
https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/
Other
11.15k stars 2.82k forks source link

InputToolbar appears in front of tabbar #1661

Closed srinathp90 closed 7 years ago

srinathp90 commented 8 years ago

I've UITabBarController. This tabBar will appears behind the JSQMessagesInputToolbar. How can i make this JSQMessagesViewController smaller? am not using container view. This happens after updating to v7.3.2.I need to show InputToolbar above the tab bar. Please help me i attached the screenshot. @jessesquires @mombrea screen shot 2016-06-09 at 12 44 03 pm

Sorix commented 8 years ago

I have the same issue on JSQMessagesViewController (from branch develop).

Lucashuang0802 commented 8 years ago

@srinathp90 @Sorix Do you think you guys can replicate from the demo app? It's easier to debug 😄

rurza commented 8 years ago

The same, but in my case it's behind toolbar.

screen shot 2016-07-29 at 20 34 46

View hierarchy:

screen shot 2016-07-29 at 20 33 54

EDIT:

I didin't read FAQ.

aq2m1my_700b

Sorix commented 8 years ago

@Lucashuang0802, I’ve reproduced bug at demo project.

My steps:

  1. Embedded Navigation Controller into Tab Bar.
  2. Switched chat modal segue to push segue (no tabs will be in modal segue).
  3. Added badges to Tab Bars, so you can see that chat is overlapping tabs incorrectly.

Demo project with bug reproduced: https://github.com/Sorix/JSQMessagesViewController/tree/tabbar-bug/SwiftExample

At screenshot you can see part of tab bar items’ badges. bug

Also I think that bug more visible will be if we will modify tab bar height.

cwalo commented 7 years ago

How about just hiding the TabBar when the MessagesViewController is pushed? messagesViewController.hidesBottomBarWhenPushed = true

Sorix commented 7 years ago

@cwalo, that is not correct solution, it's bad "hack" and somebody may need to show tab bar and chat simultaneously,

cwalo commented 7 years ago

@Sorix I wouldn't necessarily call it a hack, but now that the expected/desired behavior is clearer, I agree that it's not the solution.

Praveeeenn commented 7 years ago

@Sorix do u found any solution , i also suffer from this in my case, input toolbar hide on the tabbar... plz help me if you got any solution

algrid commented 7 years ago

Currently inputToolbar is used as an inputAccessoryView for the ViewController. And it behaves the way it is. The only option I see to fix this is to not make it inputAccessoryView and control manually its position on keyboard show/hide. That's a bit of work, though.

tapan-nathvani commented 7 years ago

is there any solution to show TabBar ?

apwelsh commented 7 years ago

I use RDVTabBarController, and the older version of this tool (2.7?). With this combo, it works.

tapan-nathvani commented 7 years ago

As i am in the middle of the project, i cant change TabBar controller... Is there any solution in this tool to show TabBar with input toolbar ?

MacMeDan commented 7 years ago

You can just make a content inset for the view to allow this. But it is a horrible idea because of the keyboard coming up. There is no way you should have a tabBar on a screen where the keyboard is shown IMO.

jessesquires commented 7 years ago

Hello everyone!

I'm sorry to inform the community that I'm officially deprecating this project. 😢 Please read my blog post for details:

http://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/

Thus, I'm closing all issues and pull requests and making the necessary updates to formally deprecate the library. I'm sorry if this is unexpected or disappointing. Please know that this was an extremely difficult decision to make. I'd like to thank everyone here for contributing and making this project so great. It was a fun 4 years. 😊

Thanks for understanding, — jsq

Luten commented 6 years ago

Found a workaround by shifting toolbar frame by bottomSpacing = tabbar height:

- (void) layoutSubviews {
    [super layoutSubviews];
    CGRect origFrame = self.frame;
    origFrame.origin.y = _keyboardIsVisible ? 0 : -self.bottomSpacing;
    self.frame = origFrame;
}

Strangely it works well in JSQMessagesInputToolbar, but it's lost after animations if I do this in UIView that wraps toolbar, or maybe I'm missing something..