我的包含视图的 viewDidLoad 中有以下代码:
// Now add the next button
UIBarButtonItem *nextButton = [[UIBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:self action:@selector(self)];
self.navigationItem.rightBarButtonItem.tintColor = [UIColor blueColor];
self.navigationItem.rightBarButtonItem = nextButton;
UINavigationController 父级在 viewDidLoad 中有这个:
[super viewDidLoad];
// Do any additional setup after loading the view.
self.navigationBar.tintColor = [UIColor whiteColor];
self.navigationBar.barTintColor = [UIColor blackColor];
如何自定义 rightBar 按钮以更改背景颜色和文本颜色?