title: UIView atop the Keyboard similar to iMessage App
body: <p>currently I'm attempting to basically implement and exact copy of Apples iMessage App.</p>
  
  <p>That means I need a UITextView that is docked at the bottom of the screen, and moves up when it becomes firstResponder. - That's pretty easy actually. There's a bazillion ways to do that and two of the most common are of course animating the view upwards or downwards if a <em>notification</em> was received. The other is to do it via the <em>inputAccessoryView</em>. Sadly some of the features the one has, the other doesn't. And they seem to be mutually exclusive.</p>
  
  <p>The big problem is <em>rotation</em>.</p>
  
  <p>I've digged through roughly at least seven different github projects, all of them re-implementing the same functionality/behavior, that I'm trying to achieve, but literally all of them failing miserably. </p>
  
  <p>HPGrowingTextView for instance, which the official Facebook/FacebookMessenger/(and possibly WhatsApp) Apps makes use of, is one big piece of junk-code. Take your iDevice, open the Facebook App, go the the Chat, pop the keyboard and rotate your device. If you pay attention you'll notice the input-bar jumping slightly and leaving some blank space between the keyboard's frame and its own. Then take a look at Apples implementation in iMessage when the keyboard is shown. It's perfect.</p>
  
  <p>Other than that the contentOffset and EdgeInset-hacking that the HPGrowingTextView library makes use of gives me nightmares.</p>
  
  <p>So I wanted to do it myself and start from scratch.</p>
  
  <p>Right now I've got a very slick, elegant and hack-less implementation of a growing UITextView, but one part is missing.</p>
  
  <p><strong>Elegant rotation.</strong></p>
  
  <p>When I simply adjust the frames to their respective new positions in the willRotateToInterfaceOrientation:duration: method, everything ends up working perfectly BUT I have the same problem that HPGrowingTextView(see Facebook App) has. A litte bit of space between the inputview and the keyboard while the rotation takes place.</p>
  
  <p>I found out that when rotating the device to landscape, the portrait keyboard which is currently shown does not "morph" but rather disappears (sends the 'willHide' notification) and a landscape version reappears (sending the 'willShow' notification). The transition is a very subtle fade and possibly some resizing.</p>
  
  <p>I re-implemented my project using the inputAccessoryView to see what happens then and I was pleasantly surprised. The inputAccessoryView rotates in perfect sync with the keyboard. There's no space/gap between the two.</p>
  
  <p>Sadly I have yet to come up with an idea how to have the inputAccessoryView dock to the bottom of the screen and <em>NOT</em> disappear/move out of it alongside the keyboard...</p>
  
  <p>What I don't want are hack-y solutions like,..."lowering the frame slightly in the toInterfaceOrientation's CoordinateSystem and then moving it back up when the didRotateFrom... was called."</p>
  
  <p>I know of one other app that has managed to implement such behavior and it's the "Kik Messenger".</p>
  
  <p>Does anyone have an idea, advice or a link that I haven't seen yet covering that topic?</p>
  
  <p>Thanks a bunch!</p>
  
  <p>Note: Once this problem is solved I will open source the project for everyone to profit because almost every implementation I was able to find over the course of the past few days, is a mess.</p>