我想改变这个 View 的颜色。我想要标签栏更多按钮 View 颜色与应用程序颜色相同,而不是白色。这怎么可能。
最佳答案
为此,您必须自定义 moreNavigationController
。一种解决方案是子类化您的 UITabBarController
并在 - (void)viewDidLoad
方法上添加以下内容。
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
UINavigationController *moreController = self.moreNavigationController;
//if u want to custamize navigationBar u can customize
//moreController.navigationBar
if ([moreController.topViewController.view isKindOfClass:[UITableView class]]) {
//Custamize your tableview here
UITableView *tableView = (UITableView *)moreController.topViewController.view;
//Change the color of tableView
[tableView setBackgroundColor:[UIColor redColor]];
moreController.topViewController.view = tableView;
}
}
希望对你有帮助
要自定义 tabBarItem
,您可以按照其他答案进行操作。
关于iphone - 标签栏的背景色更多按钮 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13264324/