Set the navigation bar background, font properties in iOS
---------------------------------------------------
1. Custom navigation controller as base class, set preferences in the + (void) Initialize method, do not set in the + (void) Load method
+ (void) Initialize {
Sets the color Tintcolor of the buttons on both sides (except the title)
[[Uinavigationbar appearance] settintcolor:fgcolor]; Fgcolor set the color of the return button Tintcolor (except for the title)
Navigation bar Background Color
[[Uinavigationbar appearance] setbartintcolor:bgcolor];
Title Property
[[Uinavigationbar appearance] settitletextattributes:@{
Nsforegroundcolorattributename:[uicolor colorwithrgbhex:0x333333],
Nsfontattributename: [Uifont systemfontofsize:18]
}];
Set navigation bar button text color (except title)
/*
Uibarbuttonitem *item = [Uibarbuttonitem appearance];
Nsdictionary *atts = @{
Nsforegroundcolorattributename: [Uicolor colorwithrgbhex:0xff0000]
};
[item Settitletextattributes:atts Forstate:uicontrolstatenormal];
*/
}
Properties settings for the IOS navigation bar