Iphone 改变';编辑';UITabBarController的moreNavigationController的按钮颜色?
我需要从UITabBarController的moreNavigationController更改“编辑”按钮颜色? 我该怎么做 我试着在大约3-4小时内寻找我该怎么做,但我找不到任何合适的解决方案 我写了下面的代码行,但它也不适合我Iphone 改变';编辑';UITabBarController的moreNavigationController的按钮颜色?,iphone,ios,objective-c,Iphone,Ios,Objective C,我需要从UITabBarController的moreNavigationController更改“编辑”按钮颜色? 我该怎么做 我试着在大约3-4小时内寻找我该怎么做,但我找不到任何合适的解决方案 我写了下面的代码行,但它也不适合我 self.tabBarController.moreNavigationController.editButtonItem.tintColor = [UIColor blackColor]; 请给出任何建议。我通过使用UINavigationController
self.tabBarController.moreNavigationController.editButtonItem.tintColor = [UIColor blackColor];
请给出任何建议。我通过使用
UINavigationController
的委托方法找到解决方案
#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.
}
这对我来说很有用:)