In my ios app, I always have a thin black line between my NavBar and/or TabBar and my underlying view. I tried to fix this by adjusting the thickness of the bars' borders to zero or setting the color of the bars' borders to the bar's color. None of this helped.
For example, I am able to adjust the thickness of the border of my UITabBar and UINavigationBar like so:
[nav1.navigationBar.layer setBorderWidth:5.0];
[navJudge.navigationBar.layer setBorderWidth:5.0];
[nav.tabBar.layer setBorderWidth:5.0];
On the other hand, setting the width to 0 does not remove the thin black line that separates my NavBar and TabBar from my view.
Since setting thickness to zero didn't work, I tried changing the border color:
[nav1.navigationBar.layer setBorderColor: [UIColor colorWithRed:0.216 green:0.263 blue:0.306 alpha:1].CGColor];
[navJudge.navigationBar.layer setBorderColor: [UIColor colorWithRed:0.216 green:0.263 blue:0.306 alpha:1].CGColor];
[nav.tabBar.layer setBorderColor:[UIColor colorWithRed:0.216 green:0.263 blue:0.306 alpha:1].CGColor];
This also works generally but when I set it to the shared background color of my view plus my NavBar and TabBar background colors (they're all the same), there is still a thin black line between the bars and the view.
Also the UIApplication window background color has been set to the same color as that of the UIView, the TabBar, and the NavBar. Still there is a black line. How can I fix this?
Thanks in advance for comments and answers.