How to change searchbar padding in swift

1.8k views Asked by At

I want to change my search bar padding with the text inside it. Is there any way to make it and could you give me a reference ? I want to make my text not too close with top and bottom search bar frame. I think i should say it a padding. Any reference will be helpful. Thank

1

There are 1 answers

1
Eendje On

Theres an UITextField in your search bar and can be accessed by:

// Assuming your searchBar is called "searchBar"
searchBar.valueForKey("searchField") as! UITextField

I'm not very sure what you mean in your question, but you can just play with the UITextField to get what you want.