I have no clue (yet) regarding the positioning of the alert, but you might try sending resignFirstResponder in your textFieldShouldReturn implementation to the alertView.
Also, that should make the keyboard disappear (even if I do not know exactly why).