导航栏中的按钮颜色 - iPhone [英] Button color in Navigation bar - iPhone
本文介绍了导航栏中的按钮颜色 - iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将此黄色按钮的色调设置为灰色?我尝试过添加图片,但没有运气。
How do you to set the tint of this yellow button to be gray? I have tried adding an image, but have had no luck.
以下是截图:
这是我的当前代码:
- (id)initWithStyle:(UITableViewStyle)style {
if (self = [super initWithStyle:style]) {
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
initWithTitle:NSLocalizedString(@"Settings", @"")
style:UIBarButtonItemStyleDone
target:self
action:@selector(GoToSettings)];
[addButton setImage:[[UIImage imageNamed:@"bg_table.png"] retain]];
self.navigationItem.rightBarButtonItem = addButton;
self.navigationItem.hidesBackButton = TRUE;
self.view.backgroundColor = [UIColor blackColor];
}
return self;
}
推荐答案
没有你的话就不可能自定义图片。
It is not possible without your custom image.
这篇关于导航栏中的按钮颜色 - iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文