Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I remove the top border on UIToolBar

I have set my UIToolBar tint color to some value, and there is this border line that I see in which I want to remove:

enter image description here

How do I remove this black border>

like image 862
adit Avatar asked Feb 24 '12 22:02

adit


3 Answers

You can do like this:

self.navigationController.toolbar.clipsToBounds = YES;
like image 193
totalitarian Avatar answered Oct 22 '22 07:10

totalitarian


toolbar1.clipsToBounds = YES;  

Worked for me incase someone is still trying with Navigational bar

like image 29
Ravi Mudaliar - Seffcon Avatar answered Oct 22 '22 06:10

Ravi Mudaliar - Seffcon


Correct answer is the one by totalitarian...FYI. https://stackoverflow.com/a/14448645/627299

My response is still below for reference.


Here's what I did with my WHITE background toolbar...

whiteToolBar.layer.borderWidth = 1;
whiteToolBar.layer.borderColor = [[UIColor whiteColor] CGColor];    

Perhaps you could do the same thing with your color instead.

like image 44
Keenan Avatar answered Oct 22 '22 07:10

Keenan