Chandler De Angelis Chandler De Angelis - 9 months ago 974
iOS Question

How to left align UISearchBar placeholder text

This is the searchbar that the designers want me to create

I need to make a custom search bar like this. The problem I am having is left aligning the placeholder text, as well as placing the search icon in the right. I have a png of the search icon that I have tried to use in an

, and set that
as the
of the
. This solution has not worked, and I ran out of ideas. Does anyone have a solution?


Don't use a UISearchBar if you need to do these kinds of customizations. You'll have to make your own using a UITextField and a UIImageView, and responding to the delegate calls.