Uitabbarcontroller+uinavigationcontroller+uitoolbar

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.