How to left align UISearchBar placeholder text
问题 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 UIImageView , and set that UIImageView as the rightView of the UISearchBar 's UITextField . This solution has not worked, and I ran out of ideas. Does anyone have a solution? 回答1: Don't use a UISearchBar if you need to do these kinds of customizations. You'll have to make