Increase spacing between icon and cursor in search bar
So I want to add a space between the searchIcon and the text that the user enters as it's too close to one another.
Take a look at the UISearchBar Class Reference by Apple and look for searchTextPositionAdjustment
.
To create a gap of 10 pixels between the icon and the text you could do the following in your code:
searchBar.searchTextPositionAdjustment = UIOffsetMake(10.0f, 0.0f);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With