1. In your own defined navigation bar or design manuscript often need to remove the navigation bar 1px horizontal line, mainly color is too uncoordinated
Remove the previous picture
To remove this 1px horizontal line, you should first know what it is, in the Xcode interface debugging can be seen, it is actually uiimageview to
Find out what the horizontal line is ...
In fact this is Navigationbar shadowimage, so as long as set it to empty, but set it to empty before you should set its background is also empty, all the code is as follows:
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];[self.navigationController.navigationBar setShadowImage:[UIImage new]];
The finished effect is as follows (isn't it all right? ):
The effect after completion
Since the horizontal line of the navigation bar can be removed, the Tabbar line can also be removed (in fact, it is shadowimage) ...
Method One:
Custom Uitabbarcontroller
Method Two:
[self.tabBarController.tabBar setBackgroundImage:[UIImage new]];[self.tabBarController.tabBar setShadowImage:[UIImage new]];
Conversely, if we want to customize the color of the horizontal line is also possible, as long as the shadowimage can be set. (If there is a better way, want to exchange a bit ~ ~)
Wen/FU HC (Jane book author)
Original link: http://www.jianshu.com/p/d0f354aa4d0d
Copyright belongs to the author, please contact the author to obtain authorization, and Mark "book author".
iOS removal of navigation bar and Tabbar 1px horizontal line