danielamitay / DAKeyboardControl

DAKeyboardControl adds keyboard awareness and scrolling dismissal (ala iMessages app) to any view with only 1 line of code.
Other
1.58k stars 214 forks source link

Animating 3 views when keyboard shown #6

Open eyalc82 opened 12 years ago

eyalc82 commented 12 years ago

Hey Daniel,

I'm having trouble using the DAKeyboardControl with my views layout

My viewController's view has 3 subviews:

  1. top view is a UIView with frame (0,0,320,54)
  2. middle view is a UITableView with frame (0, 54, 320, screenHeight - 54 - 38)
  3. bottom view s a UITextFiled with frame (0, screenHeight - 38, 320, 38)

I want that when the keyboard is shown, my top view & my tableView will animate up until the top view is completely hidden and the tableView y origin is 0. From this point the keyboard is still animating up so now the tableView height should get smaller until the keyboard animation is finished. (the bottom UITextFiled should behave like in the example - stay above the keyboard) When user pan to dismiss the keyboard the views should return to original position.

I know that this is a very specific question, but I hope u could help Thanks