IOS development-backBarButtonItem color/Text Modification

Source: Internet
Author: User

IOS development-backBarButtonItem color/Text Modification

After iOS7. The default return button font color is blue and displays the title of the parent VC (upper-level interface ).

If you want to modify it, you can use the following method:


1. Modify the font color


(1) Add View controller-based status bar appearance in plist and set it to NO



(2) Add the following code on the interface to be modified (add it to viewDIdLoad)

Self. navigationController. navigationBar. barStyle = UIStatusBarStyleDefault; [self. navigationController. navigationBar setTintColor: [UIColor greenColor];



2. Modify text content

If A ---> B is pushed from A to B, the return button is

Add the following code in interface:

UIBarButtonItem * backItem = [[UIBarButtonItem alloc] init]; backItem. title = @ ""; self. navigationItem. backBarButtonItem = backItem;

The text of the return button is changed to ""

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.