I can imagine two options:
Create your own by subclassing UITextfield
- set border style to UITextBorderStyleNone
- set the left image to the magnifying glass image.
- set the background to transparent png with only a round border showing
- use if uiimages stretchableImageWithLeftCapWidth: method is topCapHeight, so the background image will look nice when stretched
UISearchbar,
UISearchbar :
for (UIView *aSubview in [searchbar subviews]) {
if ([aSubview isKindOfClass:NSClassFromString(@"UISearchBarBackground")])
{
[aSubview removeFromSuperview];
}
if ([aSubview isKindOfClass:NSClassFromString(@"UISearchBarTextField")])
{
UITextField *aTextfield = (UITextField *)aSubview;
aTextfield.borderStyle = UITextBorderStyleNone;
aTextfield.background = nil;
aTextfield.leftView = nil;
}
}