oseparovic / MessageComposerView

Custom UIView that sticks to the keyboard like in iMessage
MIT License
100 stars 27 forks source link

Keyboard view goes off screen on navigation bar animation #9

Open aernum opened 9 years ago

aernum commented 9 years ago

When the navigation bar becomes visible as an animation on the view controller, the keyboard doesn't adjust its view and is thus off screen. I'm trying to figure out how to fix this, maybe you have a quick answer? Great work, by the way!

aernum commented 9 years ago

Sorry, I think the problem was that I added this to a UITableViewController. When I turned it into a normal UITableView and set constraints using Auto Layout, the problems went away. For some reason, the text input area will still disappear sometimes while the iOS8 autocomplete suggestion bar is visible, but that's probably a separate issue. (And using the view in this manner requires you to adjust the height of the tableView when the keyboard is visible, of course)

oseparovic commented 9 years ago

Hey aernum,

Thanks for reporting the issue. It seems a little odd that you can't add the view as a subview of a view controller as that is probably the majority case. Are there any other details to the case you had in the first comment?

  1. UITableViewController
  2. Add Message Composer as a subview
  3. Animate navigation bar visible

I don't think I ever tested this case explicitly as a I usually add the tableview as a subview of a regular UIViewController as you did later.

Also if you have time can you reproduce the textview disappearance and let me know how to make it happen?

Thanks!

deanap commented 9 years ago

I've got a similar problem, when I tried to add the MessageComposerView to UITableViewController in viewDidLoad the messageComposerView appear just under the the screen view. To see it I need to scroll and hold down, so I can't interact with it.

Please advise?

oseparovic commented 9 years ago

Hey can you try to pull the latest code? I haven't updated the lib in a little while. I just pushed up the latest code from my working copy. It seems to be working on iOS 8 iPhone 6 simulator when added to a UITableViewController