One, various names and locations
Tips for one-touch skin change
[[Uinavigationbar Appearance]setbartintcolor:[uicolor redcolor]];//give all the Navigationbar a color change
[[Uitabbar Appearance]setbartintcolor:[uicolor bluecolor]];//give all the Tabbar a color change
Two, Uinavigationbar:
1, set the navigation bar transparency: self.navigationBar.translucent = NO;
2, set bar background color: Self.navigationBar.barTintColor = [uicolour redcolour];->the tint color to apply to the navigation bar back Ground. Modifying the background color of bar
3, set navigation items and bar button items Color: self.navigationBar.tint = [uicolour blurcolour];->the tint color to apply to th E Navigation items and bar button items. Modify navigation items and bar button items;
4, set the return arrow of the custom picture//imagewithrenderingmode picture of the display mode, to set the color of the originnal image will become a custom picture color, otherwise the default system color.
UIImage *backimage = [Backimage imagewithrenderingmode:uiimagerenderingmodealwaysoriginal];//Note the following two properties are to be set, Setting only one is not valid.
[Uinavigationbar Appearance]setbackindicatortransitionmaskimage:backimage];
[Uinavigationbar Appearance]setbackindicatorimage:backimage];
5, remove the navigation bar text, drill a loophole, set the text of the positionadjustment can be:
Uibarbuttonitem Baritem = [Uibarbuttonitem appearancewhencontainedin:[uinavigationbar class],nil];
Uioffset offset;
Offset.horizontal =-500;
[Baritem Setbackbuttontitlepositionadjustment:offset Forbarmetrics:uibarmetricsdefault];
6, the navigation bar text settings.
Return button font settings
[Baritem Settitletextattributes:@{nsfontattributename:[uifont systemfontofsize:14]} forState:UIControlStateNormal ];
Change the title style of navigation
Nsdictionary *titleattributes = [Nsdictonary dictionarywithobjectsandkeys:nav_title_colour, Nsforegroundcolourattributename,nav_titlefont,nsfontattributename,nil];
[[Uinavigationbar appearance]settitletextattributes:titleattributes];
Uitoolbar: (Uitabbar's position, tool strip)
Uitabbarcontroller+uinavigationcontroller+uitoolbar