Disable UISearchBar

Tom picture Tom · Feb 7, 2012 · Viewed 10.8k times · Source

I have a -as I hope- very simple question: how to disable an UISearchBar in IOS5 to avoid user interaction? I can't find setEnabled or something like this...

Thanks!

Answer

Conrad Shultz picture Conrad Shultz · Feb 7, 2012

Have you tried:

[searchBar setUserInteractionEnabled:NO];

?