IOS7 How to modify the return button text color, arrow color, and the color of the navigation bar button on navigation bar

Source: Internet
Author: User

I want to set the background color of navigation bar to black, then all internal colors are white.

So, I used this code:

1 [[Uinavigationbar appearance] Settitletextattributes:2 [nsdictionary Dictionarywithobjectsandkeys:3 [Uicolor Whitecolor],4 Nsforegroundcolorattributename,5 [Uicolor Whitecolor],6 Nsforegroundcolorattributename,7[Nsvalue Valuewithuioffset:uioffsetmake (0, -1)],8 Nsforegroundcolorattributename,9[Uifont Fontwithname:@"Arial-bold"Size0.0],Ten Nsfontattributename, OneNil]];

However, the return button text color, arrow color, and navigation bar button color are still the default colors, how to modify them?

Workaround

Now, if you want to modify their colors, use the following code:

1 self.navigationController.navigationBar.barTintColor = [Uicolor blackcolor]; 2 self.navigationController.navigationBar.tintColor = [Uicolor whitecolor]; 3 [Self.navigationController.navigationBar settitletextattributes:@{nsforegroundcolorattributename: [Uicolor Whitecolor]}]; 4 self.navigationController.navigationBar.translucent = NO;

Transferred from: http://www.itstrike.cn/Question/e0fd5e29-34ef-49fe-9a55-a018878199a2.html

IOS7 How to modify the return button text color, arrow color, and the color of the navigation bar button on navigation bar

Related Article

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.