设置UINavigationBar的背景颜色 [英] Set background color for UINavigationBar

查看:556
本文介绍了设置UINavigationBar的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发 UINavigationBar ,并为此设置背景颜色。我已经创建了 UINavigationBar ,但我在设置backgroundcolor方面遇到了问题。有人请帮助我。谢谢。

I want to develop UINavigationBar and also set background color for that. I have created the UINavigationBar but I have problem with setting backgroundcolor. anyone please help me. Thanks.

推荐答案

[self.navigationController.navigationBar setBackgroundColor:[UIColor redColor]];

试试这样。我认为它会对你有所帮助。

Try like this. I think it will be helpful to you.

编辑:更新代码以实际编译。

updated the code to actually compile.

这篇关于设置UINavigationBar的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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