
Can anyone explain how best to emulate the behaviour the “accessory view” (in inverted comma’s as I don’t actually believe it to be an accessory view) in iOS 5’s Messages.app displays, in that I want a view that gives the impression it’s fixed to the top of the keyboard, but which remains on screen when the keyboard is dismissed.
It’s probably a separate view that gets re-positioned using an animation that has the same duration as the keyboard animation.
Try observing the UIKeyboardWillShowNotification and UIKeyboardWillHideNotification and in your handlers get the keyboard’s animation duration and frame and start your own animation to re-position the view so that it will appear to move along with the keyboard. Some similar code I use is below: