As of iOS 3.2 there’s a new way to achieve this effect:
UITextFields
and UITextViews
have an inputAccessoryView
property, which you can set to any view, that is automatically displayed above and animated with the keyboard.
Note that the view you use should neither be in the view hierarchy elsewhere, nor should you add it to some superview, this is done for you.