单击后退按钮时,ViewController标题颜色将更改更改颜色

时间:2016-12-11 20:51:28

标签: iphone swift xcode

我有一个Home viewController,它通过Segue动画链接到另一个viewController(所以我还将主ViewController链接到NavigationContoller)。在Home Viewcontroller中,我将标题文本更改为橙色,但是当我单击触发segue的按钮然后返回到Home ViewController时,标题会改变颜色。

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

1 个答案:

答案 0 :(得分:1)

由于您没有显示代码,我不知道它有什么问题。但是,我总是这样做并且有效:

转到故事板文件,然后选择"导航栏"在"导航控制器场景"在层面的东西:

enter image description here

转到右侧的Property Inspector,找到这个项目:

enter image description here

将其设置为所需的颜色!

相关问题