Initialize the navigation bar appearance effect
-(void) Initialnavigationbarstyle
{
//1. get the appearance of a navigation bar proxy object
Uinavigationbar *navbar = [Uinavigationbar appearance];
//2. set a background picture
[NavBar setbackgroundimage:[uiimage imagenamed:@ "NavBar64"] forbarmetrics:uibarmetricsdefault];
/**
Uibarmetricsdefault, the given picture will be displayed in all cases
Uibarmetricscompact, the given picture is displayed in the horizontal screen
Uibarmetricsdefaultprompt = 101, vertical screen , and with prompt text in case the picture is displayed
Uibarmetricscompactprompt, horizontal screen , and with prompt text in case the picture is displayed
*/
//3. unify the text effect of the navigation bar
Nsdictionary *attrs = @{nsforegroundcolorattributename: [Uicolor whitecolor]};
[NavBar Settitletextattributes:attrs];
}
Initialize the status bar appearance effect
-(void) Initialstatusbarstyle: (uiapplication *) application
{
// show status bar
Application.statusbarhidden = NO;
// Unified setting all status bars in the current app are white
Application.statusbarstyle = uistatusbarstylelightcontent;
}
Set the status bar and navigation bar