更改情节提要中默认后退按钮的文本颜色 [英] Change text color of default back button in storyboard

查看:61
本文介绍了更改情节提要中默认后退按钮的文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在情节提要中更改默认后退按钮的文本颜色(通过情节提要和以编程方式)?出现的默认颜色是蓝色. 问题有助于设置后退按钮的文本而不是颜色.

How to change text color of default back button in storyboard.(Both through storyboard and programmatically)? The default color which appears is blue. This question helps in setting text for back button but not the color.

推荐答案

Nitish,

在情节提要面板的边栏中,请确保选择导航控制器"的导航栏"选项卡-而不是表视图.然后将导航栏的背景颜色更改为您设置的任何颜色.一些蓝色.据我所知,您无法更改情节提要中后退按钮的颜色,因此在情节提要中设置导航栏控制器颜色后,如下图所示:

In your storyboard sidebar make sure you select the Navigation Bar tab of your Navigation Controller - not your table view. Then change the background color of your navigation bar to whatever you have set. Some blue color. As far as I know you can't change the color of your back button within storyboard so after you set the Navigation bar controller color in storyboard like the picture:

然后,您可以通过将以下代码放入viewDidLoad方法中来完成此操作:

Then you can accomplish this by putting the following code in your viewDidLoad method:

self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; //your color of what you want, I assume you want white based on your background color

结果将是这样的:

这篇关于更改情节提要中默认后退按钮的文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆