iphone Programming Glossary: searchfield
How to change inside background color of UISearchBar component on iOS http://stackoverflow.com/questions/13817330/how-to-change-inside-background-color-of-uisearchbar-component-on-ios color share improve this question use this code for change the searchBar' UITextField backGroundImage UITextField searchField NSUInteger numViews searchBar.subviews count for int i 0 i numViews i if searchBar.subviews objectAtIndex i isKindOfClass.. count for int i 0 i numViews i if searchBar.subviews objectAtIndex i isKindOfClass UITextField class conform searchField searchBar.subviews objectAtIndex i if searchField nil searchField.textColor UIColor whiteColor searchField setBackground.. objectAtIndex i isKindOfClass UITextField class conform searchField searchBar.subviews objectAtIndex i if searchField nil searchField.textColor UIColor whiteColor searchField setBackground UIImage imageNamed @ yourImage just add here gray..
Customizing search bar in iPhone application Development http://stackoverflow.com/questions/8654967/customizing-search-bar-in-iphone-application-development question you can subclass the UISearchBar and override the layoutSubviews method void layoutSubviews UITextField searchField NSUInteger numViews self.subviews count for int i 0 i numViews i if self.subviews objectAtIndex i isKindOfClass UITextField.. self.subviews count for int i 0 i numViews i if self.subviews objectAtIndex i isKindOfClass UITextField class conform searchField self.subviews objectAtIndex i if searchField nil searchField.textColor UIColor whiteColor searchField setBackground UIImage.. if self.subviews objectAtIndex i isKindOfClass UITextField class conform searchField self.subviews objectAtIndex i if searchField nil searchField.textColor UIColor whiteColor searchField setBackground UIImage imageNamed @ yourImage.png searchField setBorderStyle..
|