Just to clarify, things have moved on a bit since this solution was posted. You can still do the down swipe above the keyboard, which is standard in the OS, but you can also just use the keyboard button on the right of the bar (iPhone), or use the standard hide-keyboard button on the iPad (bottom-right).