UINavigationBar:按钮字体颜色
我有 UINavigationBar 并且我已经更改了所有后退按钮的背景颜色
@implementation UINavigationBar (UINavigationMyToolbar)
- (void) drawRect:(CGRect)rect {
self.tintColor = <UIColor>;
}
但我找不到如何更改应用程序中所有后退按钮的字体颜色的答案?!
提前致谢。
I have UINavigationBar and i've changed background color for all back buttons with
@implementation UINavigationBar (UINavigationMyToolbar)
- (void) drawRect:(CGRect)rect {
self.tintColor = <UIColor>;
}
But I couldn't find the answer how to change font color for all back buttons in app?!
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过更改
navigationController.navigationBar
背景颜色来更改按钮颜色。哦,如果您想更改整个应用程序,请将其放在 AppDelegate
didFinishLaunchingWithOptions
中,只要您不在任何其他控制器中更改它,就应该没问题。如果每个视图有不同的颜色,请将其放置在每个视图的viewWillAppear
或init
中。You can change the button colors by changing the
navigationController.navigationBar
background color.Oh, if you want to change the entire app, place that in the AppDelegate
didFinishLaunchingWithOptions
and as long as you dont change it in any other controller, you should be good. If you have different colors for each view, then place that in theviewWillAppear
orinit
for each view.