UInavigationBar和UIPickerView的背景 [英] Backgrounds for UInavigationBar and UIPickerView

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

问题描述

我了解,当您创建导航控制器时,它带有导航栏,您只能为此选择三个背景(例如:半透明黑色等)。我看过应用程序有其他颜色,如绿色的半透明黑色类型的功能。他们只是创建自己的背景视图和设置它的UINavigationBar?他们如何得到这个半透明的效果呢?像整个视图不是单一颜色,而是顶部就像一个透明的底部和一个不同的颜色。类似于在后台有一个不错的设计的UIPickerView。

I understand that when you create a navigation controller it comes with a navigation bar, you are only able to select three backgrounds for this (example: translucent black etc). I've seen applications that have other colors like green with the "translucent black" type feature. Are they simply creating their own background view's and setting it for the UINavigationBar? how do they get this "translucent" effect too? like the whole view is not a single color, but the top is like a lilttle transparent and the bottom a different color. Similar to the UIPickerView that has a nice design in the background.

我该怎么做?用图形设计程序设计图形?或者只是在视图上使用石英(渐变等)来获得这个?

How can I do this? design the graphs with a graphic design program? or simply use quartz (gradients, etc) on views to get this?

谢谢!

推荐答案

您可以通过更改 tintColor 属性UINavigationBar

You can change the color by changing the tintColor property of the UINavigationBar

myBar.tintColor = [UIColor greenColor];

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

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