views:

92

answers:

1

Hi All,
I am trying to put an image on the left side of the search bar. But the problem starts here that the search bar cannot be resized.
Is there any way to do this i.e. resize the search bar and place a small image by its side. Help me friends.

Thank You All.

A: 

The UISearchBar has a fixed height of 44. If you want to resize the height, you will need to create your own UIView based view that will mimic the appearance of the UISearchBar. If you want to resize the width, that shouldn't be a problem. Just call -setFrame on the UISearchBar. If you want to place a small image to the side of the search bar, just add a UIImageView that you can also call -setFrame on to lay it out according to your requirements.

Matt Long
I will ckeck that...Thank you
socialCircus