title: Facebook and keyboard animation management
body: <p>Does anyone know how to implement composerBar and keyboard appearing like in Facebook messenger?</p>
  
  <p>After scrolling tableView up, a keyboard appears from bottom smoothly and without any jumps .
  In my similar implementation it works like this: after scrolling up, when tableView bottom offset &lt; 0, composerBar's input text field become first responder and keyboard jumps to finger.
  Yes, I use <code>UIScrollViewKeyboardDismissModeInteractive</code>.</p>
  
  <p>How does Facebook implement this smooth animation?</p>
  
  <p><img src="https://i.stack.imgur.com/zjEF8.png" alt="keyboard"></p>
  
  <p>Edit: 
  I try to explain how it works in Facebook Messenger, step by step.</p>
  
  <p>I have InputAccessoryView on my viewController (TableViewController). Then I start to scroll TV up (pic 1)</p>
  
  <p><img src="https://i.stack.imgur.com/vNfB2.png" alt="enter image description here"></p>
  
  <p>Then, if bottom inset become more then some value (for example 10) (pic 2), I set firstResponder to inputTextField (pic 3) </p>
  
  <p><img src="https://i.stack.imgur.com/UzV7t.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/YwXgQ.png" alt="enter image description here"></p>
  
  <p>So, in common case, with 'UIScrollViewKeyboardDismissModeInteractive', keyboard jumps to finger position (pic 4)
  <img src="https://i.stack.imgur.com/PwarA.png" alt="enter image description here"></p>
  
  <p>BUT! In Facebook Messenger keyboard drags from bottom with distance equal
  to distance traveled by the finger. (pic 5)</p>
  
  <p><img src="https://i.stack.imgur.com/Ms08N.png" alt="enter image description here"></p>
  
  <p>So, facebook messenger somehow control keyboard moving.
  Question is: how??</p>