If you want to implement the above interface, it will generally show inconsistent with the expected, although we set the color is the same. The following steps can be implemented:
1. Turn off the transparency of Navigationbar
self. Navigationcontroller . Navigationbar . Translucent = NO ;
2. Using the digital color measuring meter, the navigation bar color of the RGB, again set the navigation bar color and the following view background color.
3. Remove the gray split line below the navigation bar
[self. Navigationcontroller . Navigationbar setbackgroundimage: [[UIImagealloc] init]forbarmetrics:uibarmetricsdefault];
[self. Navigationcontroller . Navigationbar setshadowimage: [[UIImagealloc]Init ]];
Remove the border gray line from the navigation bar
< Span style= "COLOR: #ff0000" >[ self navigationcontroller navigationbar setbackgroundimage :[[ UIImage alloc Init forbarmetrics : uibarmetricsdefault
Self . Navigationcontroller . Navigationbar . ShadowImage = [[UIImage alloc]init];
Remove the border black line from the search box
[Self. Mysearchbar setbackgroundimage:[[uiimage alloc] init]];
Remove the shadow from the text input box of the search box
In Stroryboard: Select the search box and the right in attribute Inspector-->view select clear color in the tint color bar
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
IOS removes the border gray line from the navigation bar; Removes the border gray line of the search box and the shadow of the text input box in it