Look at the effect chart first
This is the material.
Little brother just started to load this background picture directly with Navigationbar
In Appdelgate:
Objective C code?
1 2 |
[[Uinavigationbar appearance] setbackgroundimage:[uiimage imagenamed:@ "Topointnavbgfull"] Forbarmetrics:uibarmetricsdefault]; |
And then get the effect diagram:
There's a black line and the bottom is incomplete.
And then start to consider whether navigation's bartintcolor is white, and then start setting Bartintcolor set to Clearcolor no effect is still as strange as that, the study sums up two ways
Suitable for IOS7.0 above
1. Set the Navigationbar backgroundimage and ShadowImage
Note that this method divides a picture into two paragraphs (according to your own situation)
ShadowImage:
BackgroundImage:
In Appdelegate:
Objective C code?
1 2 3 |
[uinavigationbar Appearance] setbackgroun dimage:[uiimage imagenamed:@ "TOPOINTNAVBG"] Forbarmetrics:uibarmetricsdefault]; |