I have a tableView with a UISearchBar. Before upgrading to iOS 4, when a user selected a cell and the new viewController was pushed, the keyboard slid out of view to the left with the table.
Now, it just stays put on the screen on top of the new view. If I call [mySearchBar resignFirstResponder]; I can get rid of the keyboard, but the animation is awkward because it slides off the bottom of the screen while the new view is being pushed.
Does anyone know why the behavior would be different in iOS 4? How can I get the keyboard to be tied to the tableView so that it slides off the screen when the new view is pushed?
Thanks!
EDIT: Here's some additional information. I have the uisearchbar behind a navigationbar. It slides out when the user presses a button. I add the uisearchbar like so:
[self.navigationController.view insertSubview:self.mySearchBar belowSubview:self.navigationController.navigationBar];
I guess because the navigation bar doesn't actually get pushed to the next view (although the search bar does), the keyboard stays in place.
I tried creating a uiview behind the tableview and adding the searchbar to it, but I couldn't get it to work because of the UINavigationController and my code structure.