[英]Change 'edit' Button Color from moreNavigationController of UITabBarController?
I need to change 'edit' Button Color from moreNavigationController of UITabBarController? 我需要从UITabBarController的moreNavigationController更改“编辑”按钮的颜色吗? How can i do it ??
我该怎么做 ??
I tried to search for how can i do it about 3-4 hour but I can't got any proper solution. 我试图搜索大约3-4小时后该怎么办,但找不到任何合适的解决方案。
I write following code of line but it nor work for me. 我写下面的代码行,但它对我也不起作用。
self.tabBarController.moreNavigationController.editButtonItem.tintColor = [UIColor blackColor];
Please Give any suggestion. 请提出任何建议。
I find The Solution by using Delegate method of UINavigationController
. 我通过使用
UINavigationController
Delegate方法找到解决方案。
#pragma mark -
#pragma mark - UINavigationController Delegate Methods
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
UINavigationBar *morenavbar = navigationController.navigationBar;
UINavigationItem *morenavitem = morenavbar.topItem;
morenavitem.rightBarButtonItem.tintColor = [UIColor blackColor]; // Set Color as you need.
}
Its Work for me :) 它对我的工作:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.