Take a look at the link to Apple's UISearchBar class and find searchTextPositionAdjustment.
To create a gap of 10 pixels between the icon and the text, you can do the following in your code:
searchBar.searchTextPositionAdjustment = UIOffsetMake(10.0f, 0.0f);
source
share