PDA

View Full Version : [iPhone] More granular control over UISearchBar keyboard




Enuratique
Jul 7, 2008, 02:25 PM
Hi all,

I was wondering if it was possible to have more granular control over the keyboard that is displayed with a UISearchBar... Basically, I'd like to disable all non-alpha keys. The UISearchBarDelegate doesn't appear to have any support for individual key presses like an UITextField does, otherwise I'd handle it there. Is it possible to disable those buttons or perhaps hook the UISearchBar's delegate to UITextFieldDelegate?

I guess I could just scrap the UISearchBar altogether and convert it into a UITextField seeing as how it has more granularity that I am looking for. If I were to go this route, would it be easy to slap the little magnifying glass icon in the UITextField? And would I have to implement my own Cancel button as well?