Edelweiss
Edelweiss

Reputation: 621

Add borderless search buttons in UINavigationbar

Good morning, good evening !

I feel like my question is a dumb easy to solve question, but it looks like Google can't help me.

I want to add on my UINavigationBar a search button, but I want it borderless !

When I set it through Xcode I have this awful kind of button :

Button with border

And I want this kind of button (from the Dropbox app) : Button without border

That would be nice if someone is able to explain me the trick to achieve this !

Thank you.

Upvotes: 0

Views: 428

Answers (2)

hol
hol

Reputation: 8423

I think you have a bar button item. I have played around with it. And the Bar Buttom Item has to have a Tint of Clear Color. The actual Button a Type of Custom. Then it comes out more the way you want it (I think).

In my IB it looks like this:

enter image description here

It is the following

enter image description here

With properties like this:

enter image description here

And like this:

enter image description here

Hope it helps.

Upvotes: 1

oiledCode
oiledCode

Reputation: 8649

If you use Interface Builder set the button type to custom and use your image as background for the button.

Upvotes: 0

Related Questions