Is the effect that you want to achieve in the end:
However, the horizontal line effect that the middle arrow points to will appear at the beginning:
This is the problem with the navigation bar, the following code in the Viewwillappear method to achieve the effect:
-(void) viewwillappear: ( BOOL ) animated{
//Called when the view was about to made visible. Default does nothing
[superviewwillappear: animated];
// Remove horizontal lines below the navigation bar
[Navigationbar setbackgroundimage: [ UIImage Imagewithcolor: [selfcolorfromhexrgb:@ "33CCCC" ]]
forbarposition:uibarpositionany
barmetrics:uibarmetricsdefault];
[Navigationbar setshadowimage: [UIImagenew]];
}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
IOS Remove the horizontal line below the navigation bar (Uinavigationbar)