UINavigationBars by default have a black line at the bo开发者_Go百科ttom of them, separating themselves from the content below them.
How can I change this color, or even better, completely remove the line?
Thanks in advance.
I don't think we can remove the line but we can keep our own image instead of the default navigation bar. So we can create our own image and keep it.
To do that add this code to your app Delegate.m file in the end.
@implementation UINavigationBar (BackgroundImage)
- (void)drawRect:(CGRect)rect
{
UIImage *image = [UIImage imageNamed: @"mynavigationBar.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
Hope it helped...
精彩评论