ViewController title color will change change colo

2019-09-20 07:08发布

问题:

I have a Home viewController, and it's linked to another viewController via Segue animation (so I have also linked the home ViewController to a NavigationContoller). In the Home Viewcontroller, I have changed the title text to orange, but when I click the button that triggers the segue and then come back to the Home ViewController, the title changed color.

Home ViewController in its normal state - Back button clicked in the next view and back to Home ViewController

回答1:

Since you did not show the code, I don't know what is wrong with it. But here's how I always do it and it works:

Go to your storyboard file and select "Navigation Bar" under "Navigation Controller Scene" in the hierachy thingy:

Go to the Property Inspector on the right and find this item:

Set it to the desired color!