iPhone SDK > 4.1, UISearchBar does not respond to keyboard input if subview of an UIAlertView
Testing in the simulator for iPhone SDK > 4.1, UISearchBar does not respond to keyboard input if it is a subview of an UIAlertView.
Tests on the iPad simulator 3.2 and on a 3.1 iPod Touch device both succeed, while on the 4.1 and 4.2 开发者_JAVA技巧simulators, I can only use the keyboard to delete existing text (that I set from code), not to input text: the typing animation appears, yet no text is inputted in the UISearchBar.
There is no such behavior when using an UITextField, so it further strikes me as a very curious bug.
Can anyone else test this on a real > 4.1 device and confirm/infirm this and perhaps come up with a solution/workaround?
It seems that it's a simulator problem, the actual devices run the code in this scenario with no issues whatsoever.
精彩评论