views:

1302

answers:

2

I'd like to change the appearance of the default UISearchBar. As an example, how would you recreate the search box in the Google iPhone app as seen below? How would you overlay an image to produce this effect?

alt text

A: 

You don't need to subclass anything. Create a new UIView that has the buttons and text field and then when then entire view is going to load do this:

[self.searchDisplayController.searchBar addSubview:customSearchBarView];

Make sure to set the new text field as the first responder so it has access to the keyboard.

A: 

Upon some investigating of possibilites to customize the search bar, I'm inclined to say this is a custom component that has nothing to do with UISearchBar, but instead recreates its functionality.

Adam Woś