Implementing a Sticky Input Field in iOS
medium.com
medium.com
The input field is subview of the keyboard’s window. This is likely undesirable, especially for chat applications.
I am curious as to why this is undesirable. It makes sense to me that something docked to the keyboard would be in the same window.Interactive dismissal only made possible with UIScrollViewKeyboardDismissModeInteractive introduced since iOS 7.
This article described solution for interactive dismissal with `sticky` input field atop the keyboard.
Create a constraint that attaches the input field to the bottom of the scrollview.
One tradeoff is that dismissal doesn't start until your touch enters the real keyboard area. I'll take it, since it's safer than using KVO to observe private APIs.
The library is not really using KVO to observe private APIs, bounds/center of UIView is public property.
until then, will stick to current solution and test ahead of any new iOS release.
Maybe this decision won't bite you, but this mentality will.
i'm assuming engineers that build FB messenger, WhatsApp, Twitter etc. could be using similar approach, but I am more than happy to be proven wrong.