jessesquires / JSQMessagesViewController

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

Pan Gesture on Keyboard bug #699

Closed kartikthapar closed 9 years ago

kartikthapar commented 9 years ago
  1. I have a navigation view controller inside a scroll view (added as a child view controller). In this view controller, I push the JSQMessagesViewController subclassed instance using basic navigation push action.
  2. Now I activate the keyboard and try to pan it in the downward direction. As soon as I pan it, the UIToolbar instance containing the message view disappears. I find the toolbar when I pan the keyboard view (without the toolbar) at the bottom of the view (in it's original place). Note, the toolbar doesn't appear after I pan it to the bottom; I could see the toolbar at the bottom of the screen while I was panning the view (now closer to the bottom of the screen). [I don't have a secondary device otherwise I would have made a video].

Now I have spent about 2 hours understand different notifications and how you have implemented the pan gesture and compared my results to the demo project and I've got nothing.

jessesquires commented 9 years ago

Hey @kartikthapar - that's kind of an odd view hierarchy. It might be worth tweaking that design. Unfortunately, I don't have much advice. A video would help — you can use QuickTime to record your screen (with the simulator).

kartikthapar commented 9 years ago

Thanks. Firstly, I don't consider it to be an odd hierarchy. A number of apps use navigation controllers in paged view controllers (or scroll views).

Anyhoo, I have been debugging this for a while and I can reproduce the same bug in the demo project using a single line of code. It's completely irrelevant to view hierarchies or issues with status bar, etc.

In viewDidAppear: (or viewDidLoad:) —

self.navigationController.navigationBar.translucent = NO;

And now you can see the pan behavior for the UIToolbar. I am really not sure what is causing this though. O_o

jessesquires commented 9 years ago

Ah, you should have mentioned that to begin with. This is a known issue. See #405

kartikthapar commented 9 years ago

Oh! I didn't really see that in my first set of tests; I wondered it was something to do with me. Thanks!