IOS 5如何更改导航栏中后退按钮的颜色?

问题描述:

我想更改导航栏的后退按钮的颜色,使其看起来像这样

I want to change the color of back button of a navigation bar to make it look like this

设置 backBarButtonItem > tintColor :

Set the backBarButtonItem's tintColor:

self.navigationItem.backBarButtonItem.tintColor = [UIColor redColor];

提示:如果您希望将其应用于全部默认情况下,应用程序中的 UIBarButtonItem 实例,则可以使用新的 UIAppearance API:

TIP: If you want this to be applied to all UIBarButtonItem instances in your application by default, then you can use the new UIAppearance API to do just that:

[[UIBarButtonItem appearance] setTintColor:[UIColor redColor]];